In my docker-compose.yml
file, I have the following. However the container does not pick up the hostname value. Any ideas?
dns:
image: phensle
Based on docker documentation: https://docs.docker.com/compose/compose-file/#/command
I simply put
hostname: <string>
in my docker-compose file.
E.g.:
[...]
lb01:
hostname: at-lb01
image: at-client-base:v1
[...]
and container lb01 picks up at-lb01
as hostname.
This issue is still open here: https://github.com/docker/compose/issues/2925
You can set hostname but it is not reachable from other containers. So it is mostly useless.