I’m serving a simple web server using “Docker for Windows”, by performing a “-p 80:80” but it’s served on the internal virtual address. How can I instead make it serve (like it does on Linux) on the IP running on my machine, so that other machines on my network can access it by accessing my machine’s IP:80 …?
I faced same problem and I solved it using reverse proxy. Windows own system ports like a 80 port, so Docker cannot use it by default. (I didn’t tested administrator mode.)
Here’s my solution.
Install Nginx (or Apache2) on your computer and edit conf for reverse proxy.
Match the docker port to localhost port. (ex: Docker Port -> 80, MAC IP:Port -> localhost:12300)
Happy hacking
If you want to see screenshots, I’ll upload it. Feel free to asking.
Make sure you don’t have Skype running in the host system, because it uses port 80 and 403 by default! I had the same issue some time ago. There’s an option to disable port 80 usage though