57e9112e17 | ||
---|---|---|
.. | ||
.dockerignore | ||
Dockerfile | ||
Dockerfile.alpine | ||
Dockerfile.alpine-icu | ||
Dockerfile.chiseled | ||
Dockerfile.debian | ||
Dockerfile.nanoserver | ||
Dockerfile.ubuntu | ||
Dockerfile.windowsservercore | ||
Program.cs | ||
README.md | ||
dotnetapp.csproj |
README.md
.NET Docker Sample
This sample demonstrates how to build container images for .NET console apps. See .NET Docker Samples for more samples.
Run the sample image
You can start by launching a sample from our container registry.
docker run --rm mcr.microsoft.com/dotnet/samples:dotnetapp
This container image is built with Ubuntu Chiseled, with Dockerfile.
Build the image
You can build and run an image using the following instructions (if you've cloned this repo):
docker build --pull -t dotnetapp .
docker run --rm dotnetapp
Supported Linux distros
The .NET Team publishes images for multiple distros.
Samples are provided for:
Supported Windows versions
The .NET Team publishes images for multiple Windows versions. You must have Windows containers enabled to use these images.
Samples are provided for
Windows variants of the sample can be pulled via one the following image names:
mcr.microsoft.com/dotnet/samples:dotnetapp-nanoserver-1809
mcr.microsoft.com/dotnet/samples:dotnetapp-nanoserver-ltsc2022