dotnet /dotnet-docker

Official container images for .NET

★ 4,881⑂ 1,976👁 207⑃ 5,224● 1,847▤ 0
C#MITCreated 2015-11-16
+1
日增长
4,881
stars
1,976
forks
207
watchers
5,224
prs
1,847
issues
0
releases

README

.NET

 Featured Repos

 dotnet/sdk: .NET SDK
 dotnet/aspnet: ASP.NET Core Runtime
 dotnet/runtime: .NET Runtime
 dotnet/runtime-deps: .NET Runtime Dependencies
 dotnet/monitor: .NET Monitor Tool
 dotnet/samples: .NET Samples

 About

.NET is a general purpose development platform maintained by Microsoft and the .NET community on GitHub. It is cross-platform, supports Windows, macOS, and Linux, and can be used in device, cloud, and embedded/IoT scenarios.

.NET has several capabilities that make development productive, including automatic memory management, (runtime) generic types, reflection, asynchronous constructs, concurrency, and native interop. Millions of developers take advantage of these capabilities to efficiently build high-quality applications.

You can use C or F to write .NET apps.

 C is powerful, type-safe, and object-oriented while retaining the expressiveness and elegance of C-style languages. Anyone familiar with C and similar languages will find it straightforward to write in C.
 F is a cross-platform, open-source, functional programming language for .NET. It also includes object-oriented and imperative programming.

.NET is open source (MIT and Apache 2 licenses) and was contributed to the .NET Foundation by Microsoft in 2014. It can be freely adopted by individuals and companies, including for personal, academic or commercial purposes. Multiple companies use .NET as part of apps, tools, new platforms and hosting services.

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

 .NET Documentation

Watch discussions for Docker-related .NET announcements.

 Usage

The .NET Docker samples show various ways to use .NET and Docker together. See Introduction to .NET and Docker to learn more.

 Container sample: Run a simple application

You can quickly run a container with a pre-built .NET Docker image, based on the .NET console sample.

Type the following command to run a sample console application:

console
docker run --rm mcr.microsoft.com/dotnet/samples


 Container sample: Run a web application

You can quickly run a container with a pre-built .NET Docker image, based on the ASP.NET Core sample.

Type the following command to run a sample web application:

console
docker run -it --rm -p 8000:8080 --name aspnetcore_sample mcr.microsoft.com/dotnet/samples:aspnetapp


After the application starts, navigate to http://localhost:8000 in your web browser. You can also view the ASP.NET Core site running in the container from another machine with a local IP address such as http://192.168.1.18:8000.

 Note: ASP.NET Core apps (in official images) listen to port 8080 by default. The -p argument in these examples maps host port 8000 to container port 8080 (host:container mapping). The container will not be accessible without this mapping. ASP.NET Core can be configured to listen on a different or additional port.

Se

Top issues

Discussions

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON