Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

samples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

.NET Core Docker samples

The following samples and guidance demonstrate how to use .NET Core and Docker for development, testing and production. You can use the samples as the basis of your own Docker images or just to learn.

Building images

Development Guidance

Hosting guidance

Sample snippets

In addition to fully operational sample projects, code snippets are also provided for demonstrating more specific scenarios.

Try pre-built images

The following commands will run a .NET Core console app in a container:

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

The following command will run an ASP.NET Core console app in a container that you can access in your web browser at http://localhost:8000.

docker run --rm -it -p 8000:80 mcr.microsoft.com/dotnet/core/samples:aspnetapp

Docker Repositories

You can find .NET container images at the following Docker repositories: