Create application

Create a simple application from a template using .NET.

For our sample application, let’s create a simple application from a template using .NET. Create a directory in your local machine named dotnet-docker. Open a terminal and change to that directory. Run the following dotnet new command to create a C# app using the ASP.NET Core Web App template.

dotnet new webapp -n myWebApp -o src --no-https

Test the application

Let’s start our application and make sure it’s running properly. Open your terminal and navigate to the src directory and use the dotnet run command.

dotnet run --urls http://localhost:5000

Access the application:

http://localhost:5000

The following page should appear.

Press Ctrl+C in the terminal window to stop the application.

Last updated