-
Notifications
You must be signed in to change notification settings - Fork 24
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
Docker for Mac 4.1.1 accessing the proxy server from within a container hangs #56
Comments
configuration file:
|
We have been experiencing the same issues. We have been trying to fix it by building our own proxy and dnsmasq but with no luck. It's hard for me to understand if this issue lies with the proxy image or the dnsmasq image. So far, our efforts have been focused on the proxy. |
The dnsmasq is fine, its only job is to capture any .docker resolutions and reply with the preset IP address. What I'm pretty certain is that the request gets out of the container and arrives at the proxy as intended, but there something goes wrong. Either the proxy has a problem identifying the target container, and the request gets stalled at the pre-proxy phase, or the request goes out, but due to some new networking rules the target container blocks the proxy's ingress. I've tried to follow the chain of dockerfiles dory's proxy is built on, but I gave up after three projects. |
There might be merit in inspecting this: https://github.com/nginx-proxy/nginx-proxy . There is a chapter about only connecting to bridge networks unless specified otherwise. Maybe 4.1.1 changed something in this regard? |
Our issue on this ended up being around a seemingly breaking change with how docker-compose handles name resolution from container to container. I had multiple groups of containers running on the same network from different compose files but using the same internal name references for other containers. I had to change the containers to use unique names when referencing containers from their compose file. |
Just to add what I've discovered here, on Docker Desktop 4.6: With a configuration identical to the one shown above, and monitoring port 80 inside of the proxy container with Host machine (macOS) curling/browser GETing service.docker:
Standalone docker container that is part of the default docker network curling service.docker:
Docker container that is part of a docker compose stack + network curling service.docker:
To me, this appears to show that:
|
The solution to our blues is... not use the private IP address range that Docker Compose might recognize as a Compose network address. The Compose network separation got tighter in Compose V2 and that caused the issue. Choose an address from the 192.168.x.x range or the 10.x.x.x range for your localhost alias address and Dory should be working fine again. |
Using the localhost hack (dnsmasq resolving .docker hosts to 172.17.0.1, and aliasing lo0 to 172.17.0.1) access to the proxy server from within the containers no longer possible when using DfM 4.1.1. The HTTP request just hangs.
I have disabled V2 compose as that was wreaking other kinds of havoc (thank you, Docker!).
This is the proxy server. I have tested a few scenarios with 4.0.1 and 4.1.1, here are the results:
dory attach proxy
output is monitored by medory attach proxy
output is monitored by meAt first I was suspecting some kind of network filtering to be the issue. However, the 4.1.1 dory down trials look like there is no magic filtering going on, at least on the surface level. I don't know if dory's logging level can somehow be raised to see if the request even makes it to the container.
The text was updated successfully, but these errors were encountered: