Environment: Windows 10 Pro, Docker Desktop: 4.15.0, Running Windows containers
I am new to the world of Docker and NGINX.
Trying to run NGINX inside a Windows Server Core container. That NGINX should proxy traffic from https://localhost to a website that runs on the host itself at https://localhost:54321.
The problem is that when browsing to https://localhost, I am getting Bad Gateway error from NGINX.
Things I tried:
- using host.docker.internal instead of localhost inside the container, in NGINX config -- doesn't work
- adding localhost using --add-host -- apparently not supported on Windows
- --network="host" doesn't work -- apparently not supported on Windows
- tried adding [Host IP] localhost to windows/system32/drivers/etc/hosts in the container
Ideally, inside the container, I want localhost to point to the HOST's IP. How can I do that considering I am running Windows containers.
Thank you