In my docker-compose.yml file, I have the following. However the container does not pick up the hostname value. Any ideas?
docker-compose.yml
dns: image: phensle
As of docker-compose version 3 and later, you can just use the hostname key:
hostname
version: '3' services: dns: hostname: 'your-name'