Docker Compose DNS entries
Sometimes you need some additional DNS entries in your containers. This is how to do it in compose.yaml. Internal entries Within the containers, the name of the container in compose.yaml is resolvable via DNS. Given this compose.yaml: services: web: # … app: # … networks: myapp: driver: "bridge" We can ping web from within the app container. If we need to access the web container using another domain, we add it as a network alias:… continue reading.