Run the asp.net core cross-platform application in Docker, dockerasp.net

Source: Internet
Author: User

Run the asp.net core cross-platform application in Docker, dockerasp.net


Overview

Docker has been hot for a year or two, and I believe this is not a flash of technology, it is an innovation that will profoundly influence our future development, deployment, and operation of application systems (many people regard it as a very important cornerstone of devops ). The best way to learn docker is its official documentation. If you are interested, please refer to the https://www.docker.com/what-docker


I recently wrote a series of articles (https://aks.ms/office365devguide) on integration and expansion of Office 365, and the examples will also be deployed based on docker.


Preparation

Prepare the following environment for subsequent experiments:

  • Docker for Windows see https://docs.docker.com/docker-for-windows/ and https://docs.docker.com/docker-for-windows/install/
  • Microsoft. NET Core SDK, please refer to https://www.microsoft.com/net/core#windowscmd (I installed the latest 2.0 preview2)


  • Hands-on Lab
  • Generate docker image docker build-t mvcapp.
  • Run docker image run-p 8000: 80-e "ASPNETCORE_URLS = http: // +: 80" mvcapp

  • If you are not familiar with the above commands, please check your help. For example, dotnet new mvc-h or docker build-h


    After that, you can open the local browser and enter http: // localhost: 8000 for access.

    Related Article

    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.