Microsoft.NET.Build.Containers 0.4.0

.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 v0.4.x This is the fourth public release of the .NET SDK containerization feature. This version brings the following new features and enhancements: * [Improved support for loading images into the local daemon](https://github.com/dotnet/sdk-container-builds/pull/323) * [Predefine Conventional Labels from project metadata](https://github.com/dotnet/sdk-container-builds/pull/307) * [Better error messages when the local daemon isn't available](https://github.com/dotnet/sdk-container-builds/pull/319) * [Defined `NetSdkOCIImageBuild` project capability for projects building the image](https://github.com/dotnet/sdk-container-builds/issues/320) * [Labels and Ports are now read from the underlying config correctly](https://github.com/dotnet/sdk-container-builds/issues/332) * [Consistent error messages across the .NET CLI and IDE experiences](https://github.com/dotnet/sdk-container-builds/pull/347) * [Support layer history in created images](https://github.com/dotnet/sdk-container-builds/pull/358) * [Allow setting the `User` metadata for created images](https://github.com/dotnet/sdk-container-builds/pull/374) * [Support creating Windows Containers](https://github.com/dotnet/sdk-container-builds/pull/343) * [Support for .NET 8 conventions around image tags](https://github.com/dotnet/sdk-container-builds/pull/384) * [Default to rootless execution for .NET 8 and beyond](https://github.com/dotnet/sdk-container-builds/pull/393) * [Added support for JFrog Artifactory repositories](https://github.com/dotnet/sdk-container-builds/pull/383) ### Special thanks A big shout-out to [Daniel Kuschny](@danielku15) for his contributions to this release! Daniel investigated and solved some fundamental issues around to how we create archives to send to a local container daemon. He also diagnosed and added support for Artifactory JFrog container registries, as well as implemented support for Windows Containers. To start containerizing your projects, see our [Getting Started](http://github.com/dotnet/sdk-container-builds/blob/main/docs/GettingStarted.md) docs.

.NET 7.0

  • No dependencies.

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