I am setting up a docker compose,
I have 2 services defined, a dns server (using dnsmasq) and an apache server
The definition is as follows:
version: '3.1' services: dnsmasq: image: jpillora/dnsmasq environment: - USER=example - PASS=example restart: always dns: - 127.0.0.1 ports: - "53:53" - "53:53/udp" container_name: dnsmasq volumes: - ./dns/dnsmasq.conf:/etc/dnsmasq.conf apache: build: context: php7.2 dockerfile: Dockerfile container_name: apache2 dns: - dnsmasq ports: - "80:80" - "443:443" volumes: - /var/www:/var/www
However setting the apache dns to dnsmasq container name doesnt seem to be working. Is there a way to accomplish what I want?