1
0
mirror of https://github.com/dvddarias/docker-hoster synced 2026-08-05 16:12:43 +02:00

Include support for docker network aliases

This commit is contained in:
David Darias
2018-06-30 16:38:01 -04:00
parent 1e96db458d
commit 5d130b9303
3 changed files with 39 additions and 23 deletions
+4 -3
View File
@@ -15,13 +15,14 @@ Hoster inserts into the host's `/etc/hosts` file an entry per running container
## Container Registration
Hoster provides by default the entry `<name>.local` for each container. Also you can set a label `hoster.domains` with a list of space separated domains to include as container aliases. Containers are automatically registered when they start, and removed when they die.
Hoster provides by default the entries `<container name>, <hostname>, <container id>` for each container and the aliases for each network. Containers are automatically registered when they start, and removed when they die.
For example, the following container would be available via DNS as `myname.local`, `myserver.com` and `www.myserver.com`:
For example, the following container would be available via DNS as `myname`, `myhostname`, `et54rfgt567` and `myserver.com`:
docker run -d \
--name myname \
--label hoster.domains="myserver.com www.myserver.com" \
--hostname myhostname \
--network somenetwork --network-alias "myserver.com" \
mycontainer
If you need more features like **systemd interation** and **dns forwarding** please check [resolvable](https://hub.docker.com/r/mgood/resolvable/)