-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS resolution does not work for built services in docker-compose. #51
Comments
@derekssmith We have several compose tests which are run regular and most of them use the service name and they all pass. However, I don't think we have one where we pass the service name as part of the environment. @friism could you take a look and maybe work with @derekssmith on an simpler repro? |
To provide some more information on this. If I manually configure a network, and then provide "extra_hosts" to map the names to the IP addresses. It works. I added this network configuration:
I gave each of my services a manual
NOTE: I only have to do this on the services that are built by docker-compose. The image services work as expected. |
@derekssmith can you post output of As Rolf mentioned, it be great if you could help narrow down the problem with a simpler repro or alternatively provide a repro that I can run with public images and/or a public project. |
Here are the versions: docker version
docker-compose version
I will see if I can put a simple script together that will recreate the issue. |
could you retry with Beta27 which we released today. with recent Beta's there have been a lot of improvements around DNS resolutions. |
I installed Beta27 however I was not able to confirm the fix. Running |
I just tried again with the 1.12.3 release and it appears to be working. So whatever issue I was having before has been fixed in the latest stable release. |
Thanks for getting back. The update had both compose and core engine updates, so maybe one of them did the trick. Glad that it's working for you and I'm closing the issue |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
I have a docker compose file that is a mix of image based services and built services (using build). When I run the
docker-compose up
on my Ubuntu linux box everything works properly. However runningdocker-compose up
on my WIndows 10 box my built services can't perform name resolution to the image based services.Expected behavior
I have a Zookeeper (zoo1) service, Kafka (streams1), and my application (ingest1). zoo1 and streams1 are services configured with images. When they start up they communicate just fine with each other. I expect that when I start up ingest1 it will be able to resolve the address of zoo1 properly.
Actual behavior
On Docker for Windows, the ingest1 box gets an invalid IP address for zoo1.
Information
Here is my docker-compose.yml file:
Here is part of the output of
docker network insepct
for my network:This is the log file from ingest1:
I should be getting an address in the same network (i.e. 172.18.0.x).
Note: I have another container that is being built in the file and I get the same result.
Why aren't my built services able to use name resolution?
The text was updated successfully, but these errors were encountered: