I'm using Docker's Compose command with an ecs
context to launch and orchestrate the containers of a web app for a branch preview feature.
The problem I have is with an Nginx proxy: it can only access the other containers using their CloudMap FQDN (services.compose-project.local
), and not the short service names.
The documentation is rather clear that both should work:
Services can retrieve their dependencies using Compose service names (as they do when deploying locally with docker-compose), or optionally use the fully qualified names.
This problem is specific to the Nginx container; the other containers can reach each other using both short names and FQDN just as expected.
Docker's internal DNS server does not seem to be available in ECS:
send() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
The default AWS VPC DNS resolver 169.254.169.253
is responsive, but cannot resolve short names:
32#32: *1 webapp could not be resolved (3: Host not found)
What am I missing?