I have followed the following guide: Running ASP.NET 5 applications in Linux Containers with Docker and I cannot get this to work on my Windows PC or Linux server. My docker
Take a look at my answer here: ASP.NET 5.0 beta 8 in Docker doesn't start
Essentially, Docker is forwarding requests to your container on the 0.0.0.0
network interface, but Kestrel is only listening on localhost
by default.
So yes, the requests are being passed off to your docker container, but they are not being accepted by the Kestrel webserver. For that reason, you need to override the server.urls
property as others have posted:
ENTRYPOINT ["dnx", "web", "--server.urls", "http://0.0.0.0:5000"]
You should then see:
Now listening on: http://0.0.0.0:5000
when running your container. You can also do a quick docker ps
command to verify that 0.0.0.0
is in fact the network interface that Docker is forwarding requests for.
I also wrote a bit about how to get ASP.NET 5 running on Docker on Windows - it's a bit more involved since not only does Docker have to forward requests to the container, but we have to get VirtualBox to pass off requests to the Docker virtual machine boot2docker
(typically called default
in Virtual Box) before Docker can hand them off to our container.
Post is here: http://dotnetliberty.com/index.php/2015/10/25/asp-net-5-running-in-docker-on-windows/