The samples show various ways to use .NET Core and Docker together. You can use the samples as the basis of your own Docker images or just to play.
The samples exercise various levels of functionality. The .NET Core Docker sample includes the most functionality, including build, unit testing, and pushing images to a container registry. The ASP.NET Core Docker sample includes instructions for testing images with Azure Container Instances. The samples include detailed instructions for use with and without Docker.
You can quickly try a pre-built sample .NET Core Docker image, based on the .NET Core sample.
Type the following command to run a sample with Docker:
docker run --rm microsoft/dotnet-samples
- .NET Core Docker Sample - This sample builds, tests, and runs the sample. It includes and builds multiple projects.
- ASP.NET Core Docker Sample - This sample demonstrates using Docker with an ASP.NET Core Web App.
- Develop .NET Core Applications - This sample shows how to develop and test .NET Core applications with Docker without the need to install the .NET Core SDK.
- Develop ASP.NET Core Applications - This sample shows how to develop and test ASP.NET Core applications with Docker without the need to install the .NET Core SDK.
- Push Docker Images to Azure Container Registry
- Push Docker Images to DockerHub
- Deploy ASP.NET Core Applications to Azure Container Instances
- .NET Core Alpine Docker Sample - This sample builds, tests, and runs an application using Alpine.
- .NET Core self-contained Sample - This sample builds and runs an application as a self-contained application.
- .NET Core ARM32 Docker Sample - This sample builds and runs an application with Debian on ARM32 (works on Raspberry Pi).
- ASP.NET Core ARM32 Docker Sample - This sample builds and runs an ASP.NET Core application with Debian on ARM32 (works on Raspberry Pi).
More Samples
Docs and More Information:
- .NET Docs
- ASP.NET Docs
- dotnet/core for starting with .NET Core on GitHub.
- dotnet/announcements for .NET announcements.
.NET Core Docker Hub repos:
- microsoft/aspnetcore for ASP.NET Core images.
- microsoft/dotnet for .NET Core images.
- microsoft/dotnet-nightly for .NET Core preview images.
- microsoft/dotnet-samples for .NET Core sample images.
.NET Framework Docker Hub repos:
- microsoft/aspnet for ASP.NET Web Forms and MVC images.
- microsoft/dotnet-framework for .NET Framework images.
- microsoft/dotnet-framework-build for building .NET Framework applications with Docker.
- microsoft/dotnet-framework-samples for .NET Framework and ASP.NET sample images.