DEV Community

Kaan Karakaya
Kaan Karakaya

Posted on

How to build Asp.Net core app in docker

Today I show you how to dockerize the Asp.Net core apps for Linux machines.

First, we have to create the Asp.net app. You can clone my repo if you want. Then create Dockerfile in the location where the Solution is.

Dockerfile

Then build the app with docker.

docker build -t netcore:v1 .

To run the docker image

docker run -p 80:80 netcore:v1 --server.urls http://0.0.0.0:80

Top comments (0)