Running the ASP. NET Core sample Web site on Docker

Source: Internet
Author: User
Tags dotnet docker run

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.