The following samples and guidance demonstrate how to use .NET 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 Docker image
- Build an ASP.NET Core Docker image
- Build and test a multi-project solution
- Establishing a Docker environment
- Selecting .NET 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
You can find tips and tricks, best practices, and samples of commonly used technology in the .NET Docker scenarios documentation.
The following commands will run a .NET console app in a container:
docker run --rm mcr.microsoft.com/dotnet/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/samples:aspnetapp
You can find .NET container images at the following Docker repositories:
- dotnet: .NET
- dotnet/framework: .NET Framework