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
This seems to work correctly. If I put your config into a file:
$ cat > compose.yml <
And then bring things up:
$ docker-compose -f compose.yml up
Creating tmp_dns_1...
Attaching to tmp_dns_1
dns_1 | 2015-04-28T17:47:45.423387 [dockerdns] table.add tmp_dns_1.docker -> 172.17.0.5
And then check the hostname inside the container, everything seems to be fine:
$ docker exec -it stack_dns_1 hostname
affy.affy.com