Summary
Publishes the project as a container image loaded into a local registry (container engine), i.e. Docker or Podman.
Creates
Container if not set, otherwise keeps its other settings,
and clears any archive or registry destination.
Syntax
public static DotNetPublishSettings WithContainerLocalRegistry(this DotNetPublishSettings settings, DotNetContainerLocalRegistry localRegistry, string repository, string imageTag = null, string baseImage = null)
Examples
DotNetPublish("./src/hwapp/hwapp.csproj", new DotNetPublishSettings()
.WithContainerLocalRegistry(DotNetContainerLocalRegistry.Podman, "cake-it-hwapp", "test"));
Parameters
| Name |
Type |
Description |
| settings |
DotNetPublishSettings |
The settings. |
| localRegistry |
DotNetContainerLocalRegistry |
The local registry. |
| repository |
string |
The repository (image name). |
| imageTag |
string |
The optional image tag, replaces any image tags when set. |
| baseImage |
string |
The optional base image, i.e. mcr.microsoft.com/dotnet/sdk:11.0-resolute-aot, replaces any base image when set. |
Return Value