Closed sashaaro closed 5 years ago
Hey @sashaaro I don't quite understand this change. Is there a case where hostname_domain
and domain
would be set differently? Could you give an example where both are configured, and when a container is launched, what DNS names would it get?
Thanks!
For example from https://www.portainer.io/installation/ .
docker unix:///var/run/docker.sock {
domain docker.loc
}
docker run -d --name my-portainer portainer/portainer
Would be resolved by my-portainer.docker.loc
It is mean every container can be resolved by same rule with his name (most right column in picture bottom). If you didn't specify name to container, docker assign random name.
Same for hostname_domain
directive but it use --hostname
instead of --name
for subdomin. Work as domain
before
docker unix:///var/run/docker.sock {
hostname_domain docker-host.loc
}
docker run -d --hostname my-portainer portainer/portainer
Would be resolved by my-portainer.docker-host.loc
It is not clearly from readme file?!
Thanks for the explanation.
It is not clearly from readme file?!
No need to be abrasive here.
Want to readme would be clear for everyone
Container name is required indicator. Will be convenient to have access by container name as subdomain. I rename
domain
directive tohostname_domain
.domain
work as domain for container's names