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, newTag?: NameTagString): MaybePromise<ImageInfo | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
registryUrl | string | |
newTag | NameTagString |
Returns:
MaybePromise<ImageInfo | undefined>
Remarks
If newTag
is provided, the image will have that tag in the given registry. Otherwise, the image's existing tag will be used. It is an error in that case if there is no tag associated with the latestImage
image.
If there is no latest image available (latestImage
returns undefined), then pushTo
will return undefined. Otherwise, if the push was successful, returns an docker.ImageInfo that contains the complete nameTag, including registry portion.