Microsoft.NET.Build.Containers 8.0.103

.NET SDK Containers

This package lets you build container images from your projects with a single command.

Getting Started

To build a container from the SDK, add this package and run the publish command, specifying the DefaultContainer PublishProfile. You can learn more about Publish Profiles in the documentation.

>dotnet add package Microsoft.NET.Build.Containers
>dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer
...
Pushed container '<your app name>:<your app version>' to registry 'docker://'
...

Out of the box, this package will infer a number of properties about the generated container image, including which base image to use, which version of that image to use, and where to push the generated image. You have control over all of these properties, however. You can read more about these customizations here.

Note: This package only supports Web projects (those that use the Microsoft.NET.Sdk.Web SDK) in this version.

No packages depend on Microsoft.NET.Build.Containers.

# Microsoft.NET.Build.Containers 8.0.100 This version brings the following new features and enhancements: * For .NET 8-targeting applications, the generated container user will not have root permissions by default. This is a breaking change from previous versions, but it is a more secure default. If you need to run your container as root, you can set the `ContainerUser` property to `root` in your project file. Note also that in .NET 8 several changes were made to the Microsoft .NET base images, like changing the default ASP.NET port to 8080, so applications newly-targeting .NET may have to adjust to these settings. * Generated container images now default to using the `latest` tag instead of the value of the MSBuild `Version` property, to align with other container tooling. You can still override this behavior by setting the `ContainerTag` property in your project file. * The `ContainerFamily` property was added to support choosing from different variants of image tags without needing to specify the entire base image. For example, to target Alpine Linux you can now set `ContainerFamily` to `alpine`. * The generated images will now correctly set `User` and `ExposedPort` metadata based on well-known .NET Environment variables for these settings. * We now support using base images that set `Entrypoint` instead of `Cmd`. The previous `ContainerEntrypoint` and `ContainerEntrypointArgs` properties are still supported, but will log a warning when used. You should now use `ContainerAppCommand` and `ContainerAppCommandArgs` instead to set the desired start application - these properties allow the tooling to select the proper app start command based on the base images' use of Entrypoint or Cmd. Thanks to @tmds for this functionality! * We explicitly support using podman as a local destination for your containers. If `podman` is present on the system and `docker` is not, we will opt to use `podman` instead. If you'd like to make this behavior explicit you can set `LocalRegistry` to either `docker` or `podman`. Thanks to @tmds for this contribution! * Permissions for files in the images not don't have the executable bit set unless it is necessary. * Support for authenticating using Identity Token flows was added. This unblocks support for Azure Managed Identities, as well as all other registries where the result of `docker login <registry url>` is an Identity Token instead of an Access Token or Username/Password pair.

.NET 8.0

  • No dependencies.

Version Downloads Last updated
11.0.100-preview.4.26230.115 3 05/18/2026
11.0.100-preview.3.26207.106 4 04/20/2026
11.0.100-preview.2.26159.112 6 03/15/2026
11.0.100-preview.1.26104.118 6 02/21/2026
10.0.301 1 06/11/2026
10.0.300 4 05/18/2026
10.0.204 3 05/18/2026
10.0.203 6 04/28/2026
10.0.202 4 04/20/2026
10.0.201 7 03/14/2026
10.0.200 5 03/15/2026
10.0.109 1 06/11/2026
10.0.108 3 05/18/2026
10.0.107 5 04/28/2026
10.0.106 6 04/20/2026
10.0.105 6 03/14/2026
10.0.104 6 03/14/2026
10.0.103 6 02/20/2026
10.0.102 7 01/14/2026
10.0.101 6 01/14/2026
10.0.100 7 11/14/2025
10.0.100-rc.2.25502.107 8 10/17/2025
10.0.100-rc.1.25451.107 8 09/22/2025
10.0.100-preview.7.25380.108 7 09/29/2025
10.0.100-preview.6.25358.103 9 07/24/2025
10.0.100-preview.5.25277.114 10 06/07/2025
10.0.100-preview.4.25258.110 10 06/07/2025
10.0.100-preview.3.25201.16 10 06/07/2025
10.0.100-preview.2.25164.34 10 06/07/2025
10.0.100-preview.1.25120.13 11 06/05/2025
9.0.315 1 06/11/2026
9.0.314 3 05/18/2026
9.0.313 5 04/20/2026
9.0.312 6 03/14/2026
9.0.311 6 02/20/2026
9.0.310 6 02/20/2026
9.0.309 7 01/14/2026
9.0.308 7 11/21/2025
9.0.307 8 11/14/2025
9.0.306 9 10/17/2025
9.0.305 10 09/15/2025
9.0.304 10 09/15/2025
9.0.303 10 07/24/2025
9.0.302 11 07/14/2025
9.0.301 12 06/12/2025
9.0.300 12 05/31/2025
9.0.205 11 06/12/2025
9.0.204 12 05/29/2025
9.0.203 12 05/29/2025
9.0.202 12 05/29/2025
9.0.201 12 05/29/2025
9.0.200 12 05/29/2025
9.0.200-preview.0.24575.35 10 01/21/2025
9.0.118 1 06/11/2026
9.0.117 3 05/18/2026
9.0.116 5 04/20/2026
9.0.115 6 03/14/2026
9.0.114 6 02/20/2026
9.0.113 7 01/14/2026
9.0.112 8 11/14/2025
9.0.111 9 10/26/2025
9.0.110 10 09/15/2025
9.0.109 10 09/15/2025
9.0.108 11 07/14/2025
9.0.107 12 06/12/2025
9.0.106 13 05/29/2025
9.0.105 12 05/29/2025
9.0.104 12 05/29/2025
9.0.103 11 05/29/2025
9.0.102 12 01/21/2025
9.0.101 12 01/21/2025
9.0.100 12 01/21/2025
9.0.100-rc.2.24474.11 11 01/21/2025
9.0.100-rc.1.24452.12 11 01/21/2025
9.0.100-preview.7.24407.12 10 01/21/2025
9.0.100-preview.6.24328.19 10 01/21/2025
9.0.100-preview.5.24307.3 10 01/21/2025
9.0.100-preview.4.24267.43 10 01/21/2025
9.0.100-preview.3.24204.14 13 04/20/2024
9.0.100-preview.2.24157.36 12 04/20/2024
9.0.100-preview.1.24101.1 12 04/19/2024
8.0.422 1 06/11/2026
8.0.421 3 05/18/2026
8.0.420 4 04/20/2026
8.0.419 6 03/14/2026
8.0.418 6 02/20/2026
8.0.417 7 01/14/2026
8.0.416 8 11/14/2025
8.0.415 8 10/26/2025
8.0.414 10 09/15/2025
8.0.413 10 09/15/2025
8.0.412 11 07/14/2025
8.0.411 12 06/12/2025
8.0.410 13 05/29/2025
8.0.409 12 05/29/2025
8.0.408 12 05/29/2025
8.0.407 12 05/29/2025
8.0.406 12 05/29/2025
8.0.405 12 01/21/2025
8.0.404 12 01/21/2025
8.0.403 12 01/21/2025
8.0.402 12 01/21/2025
8.0.401 12 01/21/2025
8.0.400 12 01/21/2025
8.0.319 8 11/14/2025
8.0.318 9 10/17/2025
8.0.317 10 09/15/2025
8.0.316 10 09/15/2025
8.0.315 11 07/14/2025
8.0.314 12 06/12/2025
8.0.313 12 05/29/2025
8.0.312 12 05/29/2025
8.0.311 12 05/29/2025
8.0.310 12 05/29/2025
8.0.309 12 05/29/2025
8.0.308 13 01/21/2025
8.0.307 12 01/21/2025
8.0.306 12 01/21/2025
8.0.304 12 01/21/2025
8.0.303 13 01/21/2025
8.0.302 12 01/21/2025
8.0.301 12 01/21/2025
8.0.300 13 01/21/2025
8.0.206 12 01/21/2025
8.0.205 12 01/21/2025
8.0.204 14 04/19/2024
8.0.202 13 04/20/2024
8.0.200 14 04/18/2024
8.0.128 1 06/11/2026
8.0.127 3 05/18/2026
8.0.126 4 04/20/2026
8.0.125 6 03/14/2026
8.0.124 6 02/20/2026
8.0.123 7 01/14/2026
8.0.122 8 11/14/2025
8.0.121 8 10/26/2025
8.0.120 10 09/15/2025
8.0.119 10 09/15/2025
8.0.118 11 07/14/2025
8.0.117 12 06/12/2025
8.0.116 12 05/29/2025
8.0.115 12 05/29/2025
8.0.114 12 05/29/2025
8.0.113 13 05/29/2025
8.0.112 12 01/21/2025
8.0.111 13 01/21/2025
8.0.110 12 01/21/2025
8.0.108 12 01/21/2025
8.0.107 12 01/21/2025
8.0.106 12 01/21/2025
8.0.105 11 01/21/2025
8.0.104 15 04/18/2024
8.0.103 14 04/20/2024
8.0.102 14 04/20/2024
8.0.101 14 04/20/2024
8.0.100 14 04/18/2024
8.0.100-rc.2.23480.5 13 04/19/2024
8.0.100-rc.1.23462.41 13 04/19/2024
8.0.100-rc.1.23455.21 13 04/19/2024
8.0.100-preview.7.23376.5 12 04/18/2024
8.0.100-preview.6.23330.7 12 04/20/2024
8.0.100-preview.5.23303.1 12 04/18/2024
8.0.100-preview.4.23260.11 12 04/18/2024
7.0.410 12 01/21/2025
7.0.409 12 01/21/2025
7.0.408 14 04/20/2024
7.0.407 14 04/19/2024
7.0.406 14 04/19/2024
7.0.405 14 04/20/2024
7.0.404 13 04/19/2024
7.0.403 14 04/20/2024
7.0.402 14 04/18/2024
7.0.401 13 04/19/2024
7.0.400 13 04/19/2024
7.0.317 12 01/21/2025
7.0.316 12 01/21/2025
7.0.315 13 04/19/2024
7.0.314 13 04/20/2024
7.0.313 14 04/19/2024
7.0.312 14 04/19/2024
7.0.311 14 04/19/2024
7.0.310 14 04/20/2024
7.0.309 14 04/18/2024
7.0.308 14 04/20/2024
7.0.307 15 04/20/2024
7.0.306 15 08/18/2023
7.0.305 14 04/19/2024
7.0.304 14 04/19/2024
7.0.302 13 04/20/2024
0.4.0 13 04/20/2024
0.3.2 13 04/19/2024
0.2.7 12 01/21/2025
0.1.8 13 04/19/2024