dotnet-docker/samples/dotnetapp
Logan Bussell 57e9112e17
Fix Alpine ICU sample build (#4937)
2023-10-11 00:28:53 +00:00
..
.dockerignore Add samples script (#581) 2018-06-13 17:07:03 -07:00
Dockerfile Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.alpine Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.alpine-icu Fix Alpine ICU sample build (#4937) 2023-10-11 00:28:53 +00:00
Dockerfile.chiseled Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.debian Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.nanoserver Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.ubuntu Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Dockerfile.windowsservercore Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
Program.cs Fix bad math (#4879) 2023-09-14 15:05:04 -07:00
README.md Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00
dotnetapp.csproj Update samples to .NET 8 (#4742) 2023-09-14 09:07:03 -07:00

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