DotNetPublishSettingsExtensions.

WithContainerBaseImage(DotNetPublishSettings, string) Method

Summary

Sets the base image the container image is built from. Creates Container if not set, otherwise keeps its other settings.

Syntax

public static DotNetPublishSettings WithContainerBaseImage(this DotNetPublishSettings settings, string baseImage)

Examples

DotNetPublish("./src/hwapp/hwapp.csproj", new DotNetPublishSettings()
    .WithContainerBaseImage("mcr.microsoft.com/dotnet/sdk:11.0-resolute-aot")
    .WithContainerRegistry("localhost:5000", "cake-it/hwapp", "test"));

Parameters

Name Type Description
settings DotNetPublishSettings The settings.
baseImage string The base image, i.e. mcr.microsoft.com/dotnet/sdk:11.0-resolute-aot.

Return Value

Type Description
DotNetPublishSettings The same DotNetPublishSettings instance so that multiple calls can be chained.