Skip to content

GH5173: Add base image support to DotNetPublish container settings extensions - #5174

Merged
devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-5173
Oct 30, 2026
Merged

devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-5173

Conversation

@devlead

@devlead devlead commented Oct 30, 2026

Copy link
Copy Markdown
Member
  • Add an optional baseImage parameter to WithContainerArchive, WithContainerLocalRegistry and WithContainerRegistry. When set, it replaces any existing BaseImage; when null or whitespace, the existing value is kept.

  • Add a WithContainerBaseImage extension that sets the base image and keeps all other container settings, i.e.

    DotNetPublish("./src/hwapp/hwapp.csproj", new DotNetPublishSettings()
        .WithContainerBaseImage("mcr.microsoft.com/dotnet/sdk:11.0-resolute-aot")
        .WithContainerRegistry("localhost:5000", "cake-it/hwapp", "test"));
  • Add unit tests for the new parameter and extension.

  • Add an opt-in DotNetPublishContainer.Archive.BaseImage integration test that publishes to an archive and verifies the image's org.opencontainers.image.base.name label.

  • fixes Add base image support to DotNetPublish container settings extensions #5173

… settings extensions

- Add optional baseImage parameter to WithContainerArchive, WithContainerLocalRegistry and WithContainerRegistry, replacing any existing base image when set.
- Add WithContainerBaseImage extension to set the base image while keeping other container settings.
- Add unit tests and an Archive.BaseImage container integration test verifying the image base name label.
- fixes cake-build#5173
@devlead
devlead merged commit cf06dd0 into cake-build:develop Oct 30, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add base image support to DotNetPublish container settings extensions

1 participant