dns-proxy-server
dns-proxy-server copied to clipboard
Documentation: hostname YAML property must be defined when using Docker Compose
What is expected
When deploying Dns Proxy Server to a bunch of Docker hosts, I realized that Docker Compose deployment for which no hostname was defined into the YAML file, that DPS cannot answer to the request even if the container name was the same.
Example:
name: wordpress-prod
services:
wordpress-prod-db:
image: mariadb:10.11
container_name: wordpress-prod-db
hostname: wordpress-prod-db
environment:
[...]
volumes:
- "/srv/my-server.com/data/db:/var/lib/mysql/"
networks:
- wordpress-prod-network
restart: always
secrets:
- [...]
networks:
wordpress-prod-network:
name: wordpress-prod-network
What is Happening
We thought that DPS could handle the Docker Container names without having to specify hostname into the Docker Compose YAML file. After some tests, it appears this is needed.
Changes (Optional)
Give an example with Docker Compose in the documentation and provide more explanation about the use of hostname.