sync
actions will replace previous content of the given profile.hostctl
Sync with Docker
hostctl
allows you synchronize your hosts file with docker
containers a simple command.
sync
actions will replace previous content of the given profile.Once you have some containers up and running, you can create names for all of them to their container IP.
Command:
hostctl sync docker awesome
Output:
+---------+--------+------------+------------------------+
| PROFILE | STATUS | IP | DOMAIN |
+---------+--------+------------+------------------------+
| awesome | on | 172.17.0.2 | mystifying_wescoff.loc |
| awesome | on | 172.17.0.2 | my-awesome-web.loc |
+---------+--------+------------+------------------------+
--name
it will have a random container name.--domain,-d some.domain
domain name used for all containers.
--network networkID|networkName
filter only containers of an specific docker network.
Last updated by Sven Luijten on August 20, 2023 at 10:27 +0200
Content