I am using Windows 10 ver. 1709 and docker 17.09.1-ce-win42 (using windows containers). I successfully created an image of my ASP.NET app with microsoft/aspnet as base image.
In order to create the container, I use the command:
docker run -d -p 8001:80 --name mycontainer myimage:v1
.
The container is created properly, and if I want to access the website, I use the container's IP address known thanks to
docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' mycontainer
Despite that, I want to access my app through localhost:8001 - it does not work.
Can someone tell me if and what I did something wrong? I have read that mapping in windows containers is problematic.
Thanks in advance :)