-
Notifications
You must be signed in to change notification settings - Fork 46
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
Bind multiple docker ports to the one IP address #6
Comments
Hey @alexandertsukanov, here are some workarounds:
|
@gregnr sorry I forgot to clarify -p option doesn't work for me. I need to access container directly by IP. (The reason is my app starts child docker image without -p forwarding). The 3th option looks really cool. |
Hey, @gregnr! |
I had a crack at this with https://github.com/Mahoney/docker-etc-hosts - there's probably loads of issues with it, grateful for your thoughts on the approach. |
Mine is broken (see Mahoney/docker-etc-hosts#2), but there are other options which run a DNS proxy inside docker that will resolve container names to docker ip addresses. You then need to make that DNS proxy the host's DNS server: https://github.com/aacebedo/dnsdock I think there may be others.... |
Hi, @gregnr !
I returned here with another question. Is it possible to bind multiple ports to one IP address to reach internal docker containers e.g. Docker GATEWAY? For example, I have mysql container which uses 3306 port for all incoming connections, when mysql image restarts it changes its IP address from one to another, and I need to reconfigure my DB UI client to reconnect to the new one and this is not comfortable to me. Do you by any chance know some workarounds in such case?
Thank you very much.
Sincerely, Alex
The text was updated successfully, but these errors were encountered: