-
Notifications
You must be signed in to change notification settings - Fork 286
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 connect to docker host from within a container #37
Comments
Hi @toddlucas thank you for reporting this issue. Your use case is common to a lot of users and we are currently trying to find the best way to solve it. However I don't know if/when this will happen yet. |
Hi, I've was able to connect doing a working arround with ngix by starting it with the following config
Then, on container I just set NOTE: My Docker toolbox internal virtual switch subnet address is set to 10.0.75.0 (default), that's why I've used 10.0.75.1 IP address |
Any update on this issue? |
@vandammeb Here's my nginx config file. Note that, if you have changed the subnet address on network config, you will have to change the listen address on nginx config. Also, remember to specify I am using the following PowerShell command to find out the correct IP address when creating my container. It should return you the right IP address you should use to replace 10.0.75.1 (on both container creation command line, and nginx file):
|
@ecsousa Still no luck with the workaround you suggested. The same nginx bind issue persists: nginx_1 | 2016/10/10 16:41:17 [emerg] 1#1: bind() to 10.0.75.1:9003 failed (99: Cannot assign requested address) Would you mind having a look at my stackoverflow question? |
@dgageot Any chance this issues has been addressed in the current beta? (i'm using the stable version) |
closing this one - it has been resolved in https://github.com/docker/pinata/issues/4026 |
Hi @jasonbivins , I'm not able to see this repo or issue. Can you give us more details on when and where we might see this fix? Thanks! |
Hi @toddlucas Apologies, but that is actually our internal repo The issue is listed as fixed in 17.06 but I don't see a specific item for it in the release notes. I'll reopen this issue until I can confirm for sure that this was included. |
Hi @toddlucas I was able to confirm that this feature has been added in the latest Edge channel build. I ran a few quick tests and was able to telnet to docker.for.win.localhost from inside a container. Thanks! |
Hi @jasonbivins , thanks for following up. That's great news. Feel free to close. |
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
I would like to connect my dockerized app to ports on my local host, to use development databases, etc.
Actual behavior
I am unable to make any connection to the docker host, either using the container's IP or the gateway IP (e.g. 172.17.0.1).
Information
Docker version 1.12.0, build 8eab29e
I also attempted to create a dedicated bridge subnet using
docker network
so that I could assign an IP to the container, but I experienced the same results.I tested using an HTTP server on my host (ASP.NET Core Kestrel server), on the wildcard IP 0.0.0.0 at port 5000, attempting connection with curl. I also tested with Postgres, updating pg_hba.conf with both the wildcard IP and the DockerNAT IP (10.0.75.1 in my case).
Any workarounds would be appreciated.
Steps to reproduce the behavior
Thanks!
The text was updated successfully, but these errors were encountered: