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.
- Build a .NET Core Docker image
- Build an ASP.NET Core Docker image
- Build and test a multi-project solution
- Establishing a Docker environment
- Selecting .NET Core image tags
- Run test in a container
- Build in an SDK container
- Run applications in an SDK container
- Run ASP.NET Core Applications in development with Docker and HTTPS
- Discover licensing for Linux image contents
- Host ASP.NET Core Images with Docker and HTTPS
- Push Docker Images to Azure Container Registry
- Push Docker Images to Docker Hub
- Deploy ASP.NET Core Applications to Azure Container Instances
In addition to fully operational sample projects, code snippets are also provided for demonstrating more specific scenarios.
- Managing NuGet Credentials in Docker Scenarios
- Installing .NET Core in a Dockerfile
- Using the System.Drawing.Common Package in a Docker Container
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
You can find .NET container images at the following Docker repositories:
- dotnet/core: .NET Core
- dotnet/framework: .NET Framework