Docker Community Forums

Share and learn in the Docker community.

Unable to access .NET Core web apps from VM container

I have Windows 10 Home, so have Docker Toolbox installed, and my containers run on a VirtualBox VM on my host machine.

I went through the quickstart here and this all ran perfectly; after setting up the port forwarding on the VM, I was able to access the bulletin board via a browser on the host machine at 192.168.99.100:8000.

I then wanted to containerise an .NET Core web application of my own. However, every time I tried, I got a 404 response. Thinking that I might have missed something in my Dockerfile, I tried to use a pre-created image, and chose this one:

The console application worked perfectly, but the website again couldn’t be found (I changed the arguments in the -p argument to 8000:8080 to match my setup).

Assuming that the image at mcr.microsoft.com/dotnet/core/samples:aspnetapp is valid, then it would seem to be a setup issue with my VM perhaps, but then the node.js example works perfectly, so I’m not sure where to look now.