The samples show various ways to use .NET Framework and Docker together. You can use the samples as the basis of your own Docker images or just to play.
The samples demonstrate basic functionality. The .NET Docker Samples exercise more functionality, most of which can be applied to .NET Framework apps.
You can quickly run a container with a pre-built .NET Framework Docker image, based on the .NET Framework console sample.
Type the following Docker command:
docker run --rm mcr.microsoft.com/dotnet/framework/samples
You can quickly run a container with a pre-built sample ASP.NET Docker image, based on the ASP.NET Docker sample.
Type the following Docker command:
docker run --name aspnet_sample --rm -it -p 8000:80 mcr.microsoft.com/dotnet/framework/samples:aspnetapp
After the application starts, navigate to http://localhost:8000
in your web browser. You need to navigate to the application via IP address instead of localhost
for earlier Windows versions, which is demonstrated in View the ASP.NET app in a running container on Windows.
- .NET Framework Console Docker Sample - This sample builds, tests, and runs the sample. It includes and builds multiple projects.
- ASP.NET Web Forms Docker Sample - This sample demonstrates using Docker with an ASP.NET Web Forms app.
- ASP.NET MVC Docker Sample - This sample demonstrates using Docker with an ASP.NET MVC app.
- WCF Docker Sample - This sample demonstrates using Docker with a WCF app.
- Push Docker Images to Azure Container Registry
- Push Docker Images to DockerHub
- Deploy ASP.NET Applications to Azure Container Instances
More Samples
Docs and More Information:
- .NET Docs
- ASP.NET Docs
- WCF Docs
- dotnet/core for starting with .NET on GitHub.
- dotnet/announcements for .NET announcements.
.NET Framework:
- dotnet/framework/sdk: .NET Framework SDK
- dotnet/framework/aspnet: ASP.NET Web Forms and MVC
- dotnet/framework/runtime: .NET Framework Runtime
- dotnet/framework/wcf: Windows Communication Foundation (WCF)
- dotnet/framework/samples: .NET Framework, ASP.NET and WCF Samples
.NET:
- dotnet: .NET
- dotnet/samples: .NET Samples