Skip to content

aimenux/DockerNetCoreDemo

Repository files navigation

.NET

DockerNetCoreDemo

Dockerizing .NET Core Apps

In this repo, i m using docker in order to build several types of .net core applications :

1️⃣ App_01 : Console application

2️⃣ App_02 : Worker application

3️⃣ App_03 : WebApi application

🚀 To run code, type the following commands in your favorite terminal :

⚡ For App_01 :

  • docker build -t app01-image -f .\App_01\Dockerfile .
  • docker run --rm --name app01 -it app01-image

⚡ For App_02 :

  • docker build -t app02-image -f .\App_02\Dockerfile .
  • docker run --rm --name app02 -it app02-image

⚡ For App_03 :

  • docker build -t app03-image -f .\App_03\Dockerfile .
  • docker run --rm -p 5000:5000 -p 5001:5001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_URLS="http://+:5000" --name app03 -it app03-image
  • go to https://localhost:5000/swagger/index.html

🚀 To clean docker resources, type the following commands :

  • docker stop $(docker ps -aq --filter "name=app0*")
  • docker rm -f $(docker ps -aq --filter "name=app0*")
  • docker rmi -f $(docker images -aq --filter "reference=app0*")

Tools : net 9.0, docker

About

Dockerizing .NET Core Apps

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published