Image of Dotnet: https://hub.docker.com/r/microsoft/dotnet/, such as:
Here is a demonstration of how to run the sample program, the intention is to introduce.
1. First, pull the image: Docker pulls microsoft/dotnet; the command is in the upper-right corner of the warehouse home page. Download slow students can use Ali's accelerator.
2. Create an image with the official example:
docker run -p 8000:80 -e "ASPNETCORE_URLS=http://+:80" -it --rm microsoft/dotnet[now in the container]mkdir appcd appdotnet new mvcdotnet restoredotnet run
Exit the container with the Exit command. The above command creates a temporary image, and of course you want to create a persistent image to remove the "– RM".
3. Run the above command, then access the host's 8000 port to access the ASP. NET core sample site; results
Transferred from: http://fenglongsheng.com/post/10298.html
Running the ASP. NET Core sample Web site on Docker