Containerize an ASP.NET Core 3.1 application with Docker | .Net Core 3.1 Dockerfile example
PhotobyTriEptarokaMardianaonUnsplash[1][2]Here’saquickguidetobuildingandpackagingASP.NETCoreapplicationsinDockercontainers.I’vewrittenthisguidebasedonusingDockerDesktop(Windows),butitshouldbeapplicabletoLinuxorMacOSaswell.[3]Intheexamplebelow,I’llbepackagingasimpleASP.NETCore3.1applicationwhichreturnsthevalueofanenvironmentvariable…ReferencesTriEptarokaMardiana(unsplash.com)Unsplash(unsplash.com)DockerDesktop(docs.docker.com)
Photo by Tri Eptaroka Mardiana on Unsplash[1][2]Here’s a quick guide to building and packaging ASP.NET Core applications in Docker containers.
I’ve written this guide based on using Docker Desktop (Windows), but it should be applicable to Linux or MacOS as well.[3]
In the example below, I’ll be packaging a simple ASP.NET Core 3.1 application which returns the value of an environment variable…
References Tri Eptaroka Mardiana (unsplash.com) Unsplash (unsplash.com) Docker Desktop (docs.docker.com)