ContainerImagePushOptions.GetFullRemoteImageNameAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the full remote image name including registry endpoint and tag.
public System.Threading.Tasks.Task<string> GetFullRemoteImageNameAsync(Aspire.Hosting.ApplicationModel.IContainerRegistry registry, System.Threading.CancellationToken cancellationToken = default);
member this.GetFullRemoteImageNameAsync : Aspire.Hosting.ApplicationModel.IContainerRegistry * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function GetFullRemoteImageNameAsync (registry As IContainerRegistry, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Parameters
- registry
- IContainerRegistry
The container registry to use for constructing the full image name.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The fully qualified image name in the format "{registryEndpoint}/{repository}/{imageName}:{tag}" or "{registryEndpoint}/{imageName}:{tag}" if no repository is specified. For example: "myregistry.azurecr.io/myapp:v1.0.0" or "docker.io/captainsafia/myapp:latest".
Exceptions
Thrown when RemoteImageName is null or empty.
Thrown when registry is null.
Remarks
This method retrieves the registry endpoint asynchronously and combines it with the remote image name and tag. If RemoteImageTag is null or empty, "latest" is used as the default tag.
The RemoteImageName value is parsed to determine if it contains an override for the registry host or repository. If the RemoteImageName contains a host component (detected by the presence of a dot in the first segment), that host will be used instead of the registry endpoint. Otherwise, the registry endpoint is used and the Repository (if set) is prepended to the image name.