Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion eng/docker-tools/DEV-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Build Stage
Post_Build Stage
├── Merge image info files
├── Create multi-arch manifests
└── Consolidate SBOMs
Expand Down Expand Up @@ -191,13 +192,35 @@ Common patterns:
- `"publish"` - Publish only (when re-running a failed publish from a previous build)
- `"build,test,sign,publish"` - Full pipeline

**Note:** The `Post_Build` stage is implicitly included whenever `build` is in the stages list. You don't need to specify it separately—it automatically runs after Build to merge image info files and consolidate SBOMs.
**Note:** The `Post_Build` stage is implicitly included whenever `build` is in the stages list. You don't need to specify it separately—it automatically runs after Build to merge image info files, create and validate multi-arch manifests, and consolidate SBOMs.

The stages variable is useful for:
- Re-running just the publish stage after fixing a transient failure
- Skipping tests during initial development
- Running isolated stages for debugging

### Decoupling build OS from the base image OS

By default, a platform's `osVersion` represents the base image OS version, but also determines what
build leg an image is built in. This can cause problems when build image and base image don't match
up. For example, building a .NET app on Windows Server 2025 and copying the artifacts into a
Windows Server 2019 base image won't work, because the build matrix generation will attempt to
build the image on the Server 2019 build leg (which can't run Server 2025 images).

To fix this, set the optional `buildOsVersion` field in order to override only the OS used in the
build matrix generation. Here is an example of building a Windows Server 2019 image using Windows
Server 2025:

```jsonc
{
// ...
"os": "windows",
"osVersion": "windowsservercore-ltsc2019",
"buildOsVersion": "windowsservercore-ltsc2025"
// ...
}
```

### Image Info Files: The Build's Memory

Image info files (defined by [`ImageArtifactDetails`](https://github.com/dotnet/docker-tools/blob/main/src/ImageBuilder/Models/Image/ImageArtifactDetails.cs)) are the mechanism that tracks what was built:
Expand Down
Loading