Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
3 contributors

Users who have contributed to this file

@MichaelSimons @richlander @jiayi11
71 lines (45 sloc) 4.36 KB

.NET Framework Docker Samples

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 exercise various levels of functionality. The .NET Framework Docker sample includes the most functionality, including build, unit testing, and pushing images to a container registry. The ASP.NET Docker sample includes instructions for testing images with Azure Container Instances. The samples include detailed instructions for use with and without Docker. The WCF Docker sample includes instructions for dockerizing WCF services, either IIS-hosted or self-hosted, and how to run client app against them.

Try a pre-built .NET Framework Docker Image

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:dotnetapp

Try a pre-built ASP.NET Docker Image

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.

Building .NET Framework Apps with Docker

Push Images to a Container Registry

.NET Resources

More Samples

Docs and More Information:

Related Docker Hub Repos

.NET Framework:

.NET Core:

You can’t perform that action at this time.