You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running windows container with -p<host_port>:<exposed_port> I expect to be able to access the application in container via localhost:<host_port>.
Actual behavior
I need to discover the container IP and access the application in container via <container ip>:<exposed port> only. The application cannot be accessed via localhost:<host_port>.
Does it mean that using an ethernet interface IP i cannot access the exposed port either? Say, my host has ethernet interface with IP 10.0.0.100 and I have an exposed port bound to the port 88 of the host. Does the above mean that I still cannot access the container by 10.0.0.100:88 from the host?
Thank you, @friism. Is there a plan to introduce this functionality into roadmap? Although it does not have a big difference for production, this hindrance complicates the development process.
@minherz I don't know about MSFTs plans to make this available. With Linux containers on Windows, we have a great deal of flexibility because we have our own component (VPNKit) in the network path.With Windows containers we do not have the necessary hooks to do the same.
@minherz -- apologies for the delay, and I'll be happy to clarify.
We are working on this, and we know that it's a complication that is causing frustration in the development process. There are two cases we're aware of:
Host --> container communication using the host IP
Container --> host communication using localhost (or 127.0.0.1)
The first item is a fix that we have resolved, and should become available soon as a Windows update. We are still working on the second item, and we aim to make the fix available as soon as possible.
Reacted by Garrard Kitchen, bqstony, Claire Novotny, Thomas Perelle, Craignewkirk, Paróczai Olivér, Anay Yadav and L. Applis
@kallie-b, great news! And thank you for the update. If there is a chance that you can provide a KB number for the anticipated update, i will appreciate that.
@minherz, unfortunately I'm unable to provide a KB number for the update--even internally we tend to have only estimates for such things. But if you keep an eye on the Windows Insider updates (I imagine you're already a part of the program, but here's the link just in case), you should see the change soon. Sorry I can't help with more specifics!
@SeriousM@adragoset We have investigated this further and I can confirm that this is indeed a known issue. We are actively working on a fix for this and I will let you know once it is out!
Reacted by Joseph Musser, Bernhard Millauer, Andre Martinez, Alex Dragoset, Tobias Kohlbau, Jason Asselin, Mary Gao and Ajay Kumar
@SeriousM@adragoset Thank you for your patience -- I wanted to give you a quick update here. We have checked in a fix for this that should be available in Windows Insider build 17692 and above. Since this is an Insider build, I will try to validate that there are no other regressions that could cause this to fail and post back here.
We are also working on all the checkmarks that are needed to be able to propagate this fix to Windows April 2018 Update and Windows Server, version 1803. I will post back here if a KB is released.
Reacted by Bernhard Millauer, Josh Dovishaw and Alex Dragoset
@SeriousM@adragoset Just wanted to confirm that I validated the fix to make sure it works, both on a VM and my personal physical workstation from Windows Insider build 17692 and above. For example, I tried builds 17692 and 17704.
If you are on an older build and you are seeing this issue (e.g. 17686) please check for a network adapter with an APIPA (169.254.x.y) address. The workaround is to disable any adapters which have an APIPA (169.254.x.y) IP address assigned.
That being said, we are still working on servicing this fix back to Windows April 2018 Update and Windows Server, version 1803.
Activity
friism commentedon Feb 2, 2017
This is working as expected: https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/
@londoncalling we should document this.
minherz commentedon Feb 2, 2017
Does it mean that using an ethernet interface IP i cannot access the exposed port either? Say, my host has ethernet interface with IP 10.0.0.100 and I have an exposed port bound to the port 88 of the host. Does the above mean that I still cannot access the container by 10.0.0.100:88 from the host?
friism commentedon Feb 2, 2017
@minherz you cannot access it from the host, but other hosts on the network will be able to access
10.0.0.100:88minherz commentedon Feb 3, 2017
Thank you, @friism. Is there a plan to introduce this functionality into roadmap? Although it does not have a big difference for production, this hindrance complicates the development process.
rn commentedon Feb 3, 2017
@minherz I don't know about MSFTs plans to make this available. With Linux containers on Windows, we have a great deal of flexibility because we have our own component (VPNKit) in the network path.With Windows containers we do not have the necessary hooks to do the same.
minherz commentedon Feb 3, 2017
Thank you.
friism commentedon Feb 3, 2017
I do believe Microsoft is working on making exposed ports available on localhost for Windows containers. @kallie-b can perhaps help clarify.
kallie-b commentedon Feb 6, 2017
@minherz -- apologies for the delay, and I'll be happy to clarify.
We are working on this, and we know that it's a complication that is causing frustration in the development process. There are two cases we're aware of:
The first item is a fix that we have resolved, and should become available soon as a Windows update. We are still working on the second item, and we aim to make the fix available as soon as possible.
minherz commentedon Feb 7, 2017
@kallie-b, great news! And thank you for the update. If there is a chance that you can provide a KB number for the anticipated update, i will appreciate that.
kallie-b commentedon Feb 7, 2017
@minherz, unfortunately I'm unable to provide a KB number for the update--even internally we tend to have only estimates for such things. But if you keep an eye on the Windows Insider updates (I imagine you're already a part of the program, but here's the link just in case), you should see the change soon. Sorry I can't help with more specifics!
minherz commentedon Feb 8, 2017
Thank you a lot.
12 remaining items
SeriousM commentedon May 23, 2018
Same issue herer @adragoset, just OS-Build is 17661.
SeriousM commentedon May 24, 2018
Could we reopen this issue please?
daschott commentedon May 25, 2018
@SeriousM @adragoset We have investigated this further and I can confirm that this is indeed a known issue. We are actively working on a fix for this and I will let you know once it is out!
CuddleBunny commentedon Jun 15, 2018
@daschott - could we re-open either this issue, #204, or create a new one so folks waiting on this have something to track?
daschott commentedon Jun 19, 2018
@SeriousM @adragoset Thank you for your patience -- I wanted to give you a quick update here. We have checked in a fix for this that should be available in Windows Insider build 17692 and above. Since this is an Insider build, I will try to validate that there are no other regressions that could cause this to fail and post back here.
We are also working on all the checkmarks that are needed to be able to propagate this fix to Windows April 2018 Update and Windows Server, version 1803. I will post back here if a KB is released.
daschott commentedon Jun 27, 2018
@SeriousM @adragoset Just wanted to confirm that I validated the fix to make sure it works, both on a VM and my personal physical workstation from Windows Insider build 17692 and above. For example, I tried builds 17692 and 17704.
If you are on an older build and you are seeing this issue (e.g. 17686) please check for a network adapter with an APIPA (169.254.x.y) address. The workaround is to disable any adapters which have an APIPA (169.254.x.y) IP address assigned.
That being said, we are still working on servicing this fix back to Windows April 2018 Update and Windows Server, version 1803.
HunderlineK commentedon Jul 4, 2018
Okay, I had this issue, and it was related to where I was running the commands.
Running the command with gitbash would fail to bind the ports properly, but running
docker run ...on cmd works just fineLordRahl90 commentedon Jul 11, 2018
@HunderlineK Its still not binding with golang even while running it on cmd
daschott commentedon Jul 30, 2018
@SeriousM @adragoset @HunderlineK @LordRahl90 @CuddleBunny
Thanks for patiently waiting! We backported the container localhost/loopback access fix for Windows April 2018 Update (Windows 10 version 1803) through KB4340917, available now.
To validate this fix, you can use docker run -p 8080:80 microsoft/iis command. Once the container is running, you should be able to use loopback and access the container using http://localhost:8080 or http://127.0.0.1:8080.
thinkriver commentedon Sep 28, 2018
@daschott
I still have this issue after updating Windows 10 pro to September 26, 2018—KB4458469 (OS Build 17134.320)https://support.microsoft.com/en-us/help/4458469/windows-10-update-kb4458469
I have tried following cmd:
docker run -p 8080:80 microsoft/iis command
and access http://localhost:8080 is not working for me. But I can use host's IP address to access container, like http://10.24.10.10:8080 is working. Nether localhost nor 127.0.0.1 works.
harshal7harshal commentedon Mar 26, 2019
I am still facing the same issue. I cant access using localhost on windows 10 1803 build. Need concrete fix asap
Thanks
Harshal
hamzahanafi11 commentedon Aug 27, 2019
in my case I cannot even access from host's IP address.
I'm on windows 10 Entreprise
docker-robott commentedon Jun 20, 2020
Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.
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.
/lifecycle locked