Create your first Docker container with an ASP.NET web app

Prerequisites

To complete this tutorial, install Visual Studio 2017, including the ASP.NET and web development workload.

Install Visual Studio 2017 with the ASP.NET and Azure development workloads

You will also need to install Docker for Windows.

Create

Hint: You can add Docker support to any web application project that uses the .NET Framework or .NET Core. If you already have an existing web application project that you want to run in a Docker container, you can skip to the next step in this tutorial.

To create a new web application project, in Visual Studio, create a project by selecting File > New > Project.

In the New Project dialog, select Visual C# > Web > ASP.NET Core Web Application.

Hint: If you do not see the ASP.NET Core Web Application project type, learn how to modify your Visual Studio installation to include the Web Development workload.

Name the application myFirstContainerApp, and then select OK.

New Project dialog box

You can run any type of ASP.NET web app inside a container. For this quickstart, select the Web Application template, and make sure authentication is set to No Authentication.

Select OK.

New ASP.NET Project dialog box

From the menu, select Debug > Start without Debugging to run the web app locally.

Run app locally


I ran into an issue I have created my ASP.NET web app