Saturday, June 18, 2022

Azure Dotnetcore Docker App


Dockerize .Net core app

You can use the following information as a reference for the previous chapter

1. For the Dockerfile, put the following in a file with the name of Dockerfile

2. Next you can use the following commands

// This is for publishing your .Net Core application from command prompt

dotnet publish

// This is for building your docker image

sudo docker build -t dotnetapp .

// This is for running your custom image as a container

sudo docker run -d -p 80:80 dotnetapp

3. The code is also attached as a resources to this chapter. This is a zip file. You can also use the simple ASP.Net Core based templates available in Visual Studio to create your web project


Post a Comment