Summary
Publishes the project as a container image pushed to a registry, i.e.
ghcr.io.
Creates
Container if not set, otherwise keeps its other settings,
and clears any archive or local registry destination.
Syntax
public static DotNetPublishSettings WithContainerRegistry(this DotNetPublishSettings settings, string registry, string repository, string imageTag = null, string baseImage = null)
Examples
DotNetPublish("./src/hwapp/hwapp.csproj", new DotNetPublishSettings()
.WithContainerRegistry("localhost:5000", "cake-it/hwapp", "test"));
Parameters
| Name |
Type |
Description |
| settings |
DotNetPublishSettings |
The settings. |
| registry |
string |
The 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