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