Cloud API Overview > @adpt/cloud > docker > DockerImageInstance > pushTo
docker.DockerImageInstance.pushTo() method
Pushes the image returned by latestImage
to a Docker registry.
Signature:
pushTo?(registryUrl: string, newPathTag?: string): MaybePromise<ImageRefRegistry | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
registryUrl | string | |
newPathTag | string |
Returns:
MaybePromise<ImageRefRegistry | undefined>
Remarks
If newPathTag
is not provided, the image's existing pathTag will be used when pushing to the given registry. It is an error in that case if there is no path or tag associated with the latestImage
image.
If newPathTag
is provided in path:tag
format, the image will have that path and tag in the given registry. If the :tag
portion is omitted, the tag default
will be used.
If there is no latest image available (latestImage
returns undefined), then pushTo
will return undefined. Otherwise, if the push was successful, returns an docker.ImageRefRegistry that contains the complete nameTag, including registry portion.