Public | Automated Build

Last pushed: 14 days ago
Short Description
ASP.NET is an open source server-side Web application framework
Full Description

Supported tags and respective Dockerfile links

These images are updated via pull requests to the microsoft/aspnet-docker GitHub repo.


What is ASP.NET

ASP.NET is a high productivity framework for building Web Applications using Web Forms, MVC, Web API and SignalR.

This repository contains Dockerfile definitions for ASP.NET Docker images. These images use the IIS image as their base.

This image contains:

  • Windows Server Core as the base OS
  • IIS 10 as Web Server
  • .NET Framework (multiple versions available)
  • .NET Extensibility for IIS

How to use these Images

Copy 4.7\sample\Dockerfile to your app directory. You would then be able to build and run the site from the app directory.

$ docker build -t aspnet-site --build-arg site_root=/
$ docker run -d -p 8000:80 --name my-running-site aspnet-site

There is no need to specify an ENTRYPOINT in your Dockerfile since the microsoft/aspnet base image already includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC).

Verify in the browser

With the current release, you can't use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT, and will be resolved in future. Until that is addressed, you need to use the IP address of the container.

Once the container starts, you'll need to finds its IP address so that you can connect to your running container from a browser. You use the docker inspect command to do that:

docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site

You will see an output similar to this:

172.28.103.186

You can connect the running container using the IP address and configured port, http://172.28.103.186 in the example shown.

For a comprehensive tutorial on running an ASP.NET app in a container, check out the tutorial on the docs site.

Image variants

The microsoft/aspnet images come in different flavors, each designed for a specific use case.

4.7

This image is for ASP.NET applications built for the .NET Framework 4.0 and later versions. It is based on the dotnet-framework:4.7 image and includes .NET Framework Extensibility for IIS.

4.6.2

This image is for ASP.NET applications built for the .NET Framework 4.6.2. It is based on the dotnet-framework:4.6.2 image and includes .NET Framework Extensibility for IIS.

3.5

This image is for ASP.NET applications built for the .NET Framework 3.5. It is based on the dotnet-framework:3.5 image and includes .NET Framework Extensibility for IIS.

Related Repos

See the following related repos for other application types:

License

View license information for the software contained in this image.

Windows Container images are licensed per the Windows license:

MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS

CONTAINER OS IMAGE

Microsoft Corporation (or based on where you live, one of its affiliates) (referenced as “us,” “we,” or “Microsoft”) licenses this Container OS Image supplement to you (“Supplement”). You are licensed to use this Supplement in conjunction with the underlying host operating system software (“Host Software”) solely to assist running the containers feature in the Host Software. The Host Software license terms apply to your use of the Supplement. You may not use it if you do not have a license for the Host Software. You may use this Supplement with each validly licensed copy of the Host Software.

Supported Docker versions

This image is officially supported on Docker version 1.12.2.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

Documentation

You can read documentation for ASP.NET, including Docker usage in the .NET docs.

The docs are also open source on GitHub. Contributions are welcome!

Supported tags and respective Dockerfile links

These images are updated via pull requests to the microsoft/aspnet-docker GitHub repo.


What is ASP.NET

ASP.NET is a high productivity framework for building Web Applications using Web Forms, MVC, Web API and SignalR.

This repository contains Dockerfile definitions for ASP.NET Docker images. These images use the IIS image as their base.

This image contains:

  • Windows Server Core as the base OS
  • IIS 10 as Web Server
  • .NET Framework (multiple versions available)
  • .NET Extensibility for IIS

How to use these Images

Copy 4.7\sample\Dockerfile to your app directory. You would then be able to build and run the site from the app directory.

$ docker build -t aspnet-site --build-arg site_root=/
$ docker run -d -p 8000:80 --name my-running-site aspnet-site

There is no need to specify an ENTRYPOINT in your Dockerfile since the microsoft/aspnet base image already includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC).

Verify in the browser

With the current release, you can't use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT, and will be resolved in future. Until that is addressed, you need to use the IP address of the container.

Once the container starts, you'll need to finds its IP address so that you can connect to your running container from a browser. You use the docker inspect command to do that:

docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site

You will see an output similar to this:

172.28.103.186

You can connect the running container using the IP address and configured port, http://172.28.103.186 in the example shown.

For a comprehensive tutorial on running an ASP.NET app in a container, check out the tutorial on the docs site.

Image variants

The microsoft/aspnet images come in different flavors, each designed for a specific use case.

4.7

This image is for ASP.NET applications built for the .NET Framework 4.0 and later versions. It is based on the dotnet-framework:4.7 image and includes .NET Framework Extensibility for IIS.

4.6.2

This image is for ASP.NET applications built for the .NET Framework 4.6.2. It is based on the dotnet-framework:4.6.2 image and includes .NET Framework Extensibility for IIS.

3.5

This image is for ASP.NET applications built for the .NET Framework 3.5. It is based on the dotnet-framework:3.5 image and includes .NET Framework Extensibility for IIS.

Related Repos

See the following related repos for other application types:

License

View license information for the software contained in this image.

Windows Container images are licensed per the Windows license:

MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS

CONTAINER OS IMAGE

Microsoft Corporation (or based on where you live, one of its affiliates) (referenced as “us,” “we,” or “Microsoft”) licenses this Container OS Image supplement to you (“Supplement”). You are licensed to use this Supplement in conjunction with the underlying host operating system software (“Host Software”) solely to assist running the containers feature in the Host Software. The Host Software license terms apply to your use of the Supplement. You may not use it if you do not have a license for the Host Software. You may use this Supplement with each validly licensed copy of the Host Software.

Supported Docker versions

This image is officially supported on Docker version 1.12.2.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

Documentation

You can read documentation for ASP.NET, including Docker usage in the .NET docs.

The docs are also open source on GitHub. Contributions are welcome!

Docker Pull Command
Owner
microsoft
Source Repository

Comments (20)
brunofvalli
20 days ago

Should Environment Variables work? I have the code inside my ASP.NET page @Environment.GetEnvironmentVariable("MyVariable")

And on docker I have the Environment Variable
"MyVariable", "Test"

But I don't get a value at run time inside the docker container.

pennyply
a month ago

this images only be used in windows ? can be used in linux?

valx
3 months ago

You can assign the static IP adding these parameters to run command: --net nat --ip 172.28.103.186

syteck
5 months ago

If you have a problem that looks like your pull freeze at a certain point and after that you can't do anything with Docker without having an error with daemon try to configure your antivirus or turn it off. I had a problem with Kaspersky in Protection section the System Watcher was deleting files everytime.

rainmakerho
6 months ago

may i include .net 4.x & .net 3.x ?

markdharris
6 months ago

If you are seeing the unknown blob error, check https://forums.docker.com/t/unknown-blob-when-pulling-microsoft-nanoserver/20291 and make sure you're running windows containers and not linux containers.

geniusq
6 months ago

How to fix the "Unknown blob" error?

gallwood
8 months ago

Should I be able to use this image on Win10? It's failing on extracting after a docker pull.

vnuuk
8 months ago

Guys! I ahve a problem pulling this image from Windows 10. Have "Unknown blob" error. Docker client v1.12.2. Do you have any ideas? Tried to do so on 3 different machines and have the same error.

reachgopal
a year ago

How is the license work?