When running docker container in the interactive mode (param: -it) you can get IP of the container directly in the console - ipconfig. This IP is the container IP address. Since you are running the container in Win10 and I suppose you are using default NAT adapter you cant access the container using port mapping (eg. localhost:port). The reason is WinNAT that simply doesn
t work like this now. In WinServer2016 you can use this method (port mapping).
So you have to (on Win10):
- Obtain IP of the container (ipconfig inside the container or docker inspect [containername] and search for the IP (almost in the bottom of the result).
- Expose the port you need to access to (docker run –expose [port number]).
- Access from you host like this: http://ip-of-your-container:port
That`s all.