TL DR: Why is the underlying aspnet application running on port 80 from the Docker image, but 5000 outside the docker image.
Elaborate
I got acquainted with the aspnet core / docker tutorial:
https://docs.microsoft.com/en-us/dotnet/core/docker/building-net-docker-images
Halfway through the page, I launch the application as prescribed:
dotnet run
Above all else, it prints this:
Now Listening on: http://localhost:5000
Great. This is what I expected. The next thing to do in the tutorial is to run the same application from the Docker image.
docker build -t aspnetapp .
docker run -it --rm -p 5000:80 --name aspnetcore_sample aspnetapp
The result is
Now listening on: http://[::]:80
. Wat? aspnet 80?. 5000, . .
, - , , .