domains / families / devops / sdk-container-publishing
sdk-container-publishing
separate
Publish .NET services as container images with the built-in SDK tooling (dotnet publish /t:PublishContainer, Microsoft.NET.Build.Containers) - no Dockerfile required. Covers the MSBuild property surface, base-image inference, self-contained and AOT implications, and CI/CD publishing.
When to use
- You want a container image for a .NET service and do not want to hand-write a Dockerfile
- You want to know how to tag, name, or expose ports on an SDK-built image without a Dockerfile
- You are wiring container publishing into CI / CD or a release pipeline
- An SDK-built image pushes to the wrong registry, gets the wrong tag, or picks the wrong base image
- You need a tarball of an image for scanning or air-gapped loading
- You need a `RUN` step or arbitrary layer customization in the image. The SDK tooling cannot emulate `RUN`; write a Dockerfile instead.
When not to use
- Images requiring RUN steps or arbitrary layer customization
Skill page
Source