# ASP.NET

[Source files](https://github.com/bfren/docker-aspnet) (GitHub)\
[Container images](https://hub.docker.com/r/bfren/aspnet) (Docker Hub)

## Acknowledgements

Comes pre-installed with the [ASP.NET runtime](https://dotnet.microsoft.com/) and all required dependencies.

## Tags

<table><thead><tr><th width="209.49763033175356">.NET Version</th><th>Tags</th></tr></thead><tbody><tr><td>3.1</td><td>net3, net3.1, net3.1.21</td></tr><tr><td>5.0</td><td>net5, net5.0, net5.0.12</td></tr><tr><td>6.0</td><td>latest, net6, net6.0, net6.0.0</td></tr></tbody></table>

In addition, you can add `-dev` and `-beta` suffixes to access development / test builds (see Docker Hub for further details).

## Ports

| Port   | Description                                |
| ------ | ------------------------------------------ |
| `5000` | Serves HTTP content from your application. |

## Volumes

| Volume         | Purpose                                                                                                                                                                                  |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/app/live`    | Contains live application files.                                                                                                                                                         |
| `/app/publish` | Publish updated files to this directory and use [aspnet-switch-terminate](https://docs.bfren.dev/docker/base-images/scripts-and-executables#aspnet-switch-terminate) to make it go live. |

## Environment Variables

<table><thead><tr><th width="212.25322315006738">Name</th><th width="150">Values</th><th width="161">Description</th><th>Default</th></tr></thead><tbody><tr><td><code>ASPNET_ASSEMBLY</code></td><td>string</td><td>The filename of the assembly to execute.</td><td><em>None</em> - <strong>required</strong></td></tr><tr><td><code>ASPNETCORE_URLS</code></td><td>string</td><td>Default value binds web server to port 5000 - should not normally need to be changed.</td><td><a href="http://+:5000">http://+:5000</a></td></tr><tr><td><code>DOTNET_RUNNING_IN_CONTAINER</code></td><td>'true' or 'false'</td><td>This should always be set to true - it tells dotnet that it is running in a container environment.</td><td>'true'</td></tr><tr><td><code>DOTNET_SYSTEM_GLOBALIZATION_INVARIANT</code></td><td>'true' or 'false'</td><td>See <a href="https://github.com/dotnet/runtime/blob/master/docs/design/features/globalization-invariant-mode.md">here</a> and <a href="https://github.com/dotnet/announcements/issues/20">here</a>.</td><td>'true'</td></tr></tbody></table>
