Sync with Docker

hostctl allows you synchronize your hosts file with docker containers a simple command.

All 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.


hostctl sync docker awesome


| PROFILE | STATUS |     IP     |         DOMAIN         |
| awesome | on     | | mystifying_wescoff.loc |
| awesome | on     | | my-awesome-web.loc     |
If you start your docker containers without --name it will have a random container name.

Available Options

  • --domain,-d some.domain domain name used for all containers.

  • --network networkID|networkName filter only containers of an specific docker network.

Last updated by Márk Sági-Kazár on December 8, 2021 at 11:06 +0100