-
Notifications
You must be signed in to change notification settings - Fork 121
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
Unable to use internal docker repo over VPN (still) #540
Comments
same for me, not working even after restarting docker for mac |
Same for me with the latest beta release and MacsOs Sierra. On MacOs, /etc/resolv.conf does not provide the relevant DNS infos. scutil --dns does. Docker for Mac: version: 1.12.2-beta28 (71c4a00) |
I'm having the same problem and have spent many hours trying to find a solution. Hopefully the information I provide below helps Docker with an investigation. Note that some info has been redacted. I'm using Docker for Mac, stable version:
Part of our Docker build includes pulling images from an in-house artifactory repository. For some reason, starting today, this began failing. During a Docker build, numerous artifacts would pull from artifactory just fine and then suddenly the build would hit an inability to resolve the same host (that had been resolving just perfectly seconds before in the same Docker build). Note that I am on VPN using Cisco AnyConnect. I've found this to be very reproducible. Here's a very simple Dockerfile that builds an alpine image and installs bash. You can then hop into the image to start trying to resolve hosts. Start with Dockerfile:
Now build and run bash:
When I try to lookup our in-house artifactory inside the container:
A number of the lookups succeed and others fail. Huh?! Here's
So what does the Docker container have?:
That's very surprising. I thought Docker was supposed to make this match the host's /etc/resolv.conf. I have no idea what these IP addresses point to, but I thought I'd pick one or two and do some An extremely odd detail to add is that I can only see this problem with I noticed that I was able to create a custom bridge network and use that instead. When you do so, the
Unfortunately, I've found no way to specify that this network be used when doing a Docker build. Something odd is going on with the default Docker |
Here's a rather ugly work-around that I've discovered:
Add a
Think carefully about what you want to be in here. As I mentioned in my previous comment, Now:
Docker will automatically restart, and you're good to go. The If this doesn't work, or you mess up, you can always change it back or do a reset on Docker. To the Docker team: There's a bunch of open questions here:
|
@ShannonHickey first of all thank you for the clear report. I apologise for the trouble this is causing you (and others), but be assured that we're working on it! To hopefully answer your questions:
In beta 30 (released ~3 hours ago) the DNS implementation has been revamped. It's probably not perfect yet, so bug reports and diagnostic uploads would be appreciated. The changes are:
Let me know how beta 30 behaves in your environment. FYI For experimentation purposes the DNS configuration is stored in the database key:
Although this file is automatically updated by the UI when the SC database changes, it's possible to edit it then
and the changes should take effect immediately. Thanks again for your reports and all your patience! |
@djs55 Thanks very much for this detailed response. I'm happy to confirm that beta 30 fixes the issues I've been having with a VPN and private registry. |
@djs55 thank you so much for taking the time to read and respond to my comment. I'm very pleased to share that beta 30 also fixes my issue. Fantastic! I'm pretty sure that my problem had something to do with item 3 in the discussion above, except in reverse. In particular, sometimes queries for internal servers were sent to my router for DNS (third entry in the host's There is still something that puzzles me though. Perhaps you can explain. If I bring up a container using the default network, I get a single entry of
Thanks again! |
@djs55 Thanks! Works for me too with beta30. |
@ShannonHickey @aminvielle I'm glad that beta 30 is working for you so far! FYI I'm currently fixing a bug with the caching logic -- unfortunately the responses from the cache have a field incorrectly set in the header. For some reason most software is oblivious to this, but I've seen it cause (rarely) some resolution failures. I'm working on a fix for this at the moment. Regarding the remaining question about
I hope that makes things a little clearer! |
Working for me in beta30. |
It seems now proxy cannot be resolved after this update. I resolved this by adding IP address of the proxy server.
|
@kaskavalci could you open a fresh issue with a fresh diagnostics upload? Thanks! |
I'm having similar kind of issue. I'm trying to reach the private npm artifactory but always getting timeout. There seems to be an issue with our artifactory as i.e. default docker subnets conflict with the subnet we host artifactory on. I'm using docker mac: Docker info:
Note that I'm using docker-compose to run and I am on VPN using Cisco AnyConnect. My Dockerfile:
I'm creating a new network for the node service as follows:
Following are my scutil --dns and resolv.conf respectively from mac:
resolver #1 resolver #2 resolver #3 resolver #4 resolver #5 resolver #6 resolver #7 DNS configuration (for scoped queries) resolver #1 resolver #2 resolv.conf
Now my Docker resolv.conf ::
I'm executing simple curl command to connect to the artifactory using docker exec -it dev_node curl -I -vvvv artifactory.abc.com:8081 .I tried to add my artifactory address(i.e.172.18.122.156) in my /etc/hosts file of container but still no luck. So still I'm facing issue to connect to the artifactory within the docker container. Solved: |
@bsushant-athena, I have almost the same exact setup as you and experiencing the same issue in the latest Docker. We run Artifactory and connect to the VPN with Cisco AnyConnect. Can you expand a bit on what exactly you did to fix this? |
I had my own user-defined network which was causing this issue so I deleted it. |
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. |
Expected behavior
When connected to my company VPN (Pulse Secure) I should be able to pull images from our internal docker repo. I thought this would work now that #19 is closed, but I'm still seeing the same symptom I always have. I tried resetting docker, in case it was a remnant of an old VM, but still seeing the problem.
Actual behavior
Information
scutil --dns
output (lightly anonymized):/etc/resolv.conf
in my docker VM:Workaround
I'm able to work around this issue by manually modifying
/etc/resolv.conf
in the container to point at our internal DNS servers (aaa.bbb.ccc. in the above output).The text was updated successfully, but these errors were encountered: