GCLOUD_CONTAINER_IMAGES_ADD-TAG(1)

NAME

gcloud container images add-tag - adds tags to existing image

SYNOPSIS

gcloud container images add-tag SRC_IMAGE DEST_IMAGE [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
The container images add-tag command adds the tag specified in the second tag parameter to the image referenced in the first tag parameter. Repositories must be hosted by the Google Container Registry.

POSITIONAL ARGUMENTS

    SRC_IMAGE
        The fully qualified name(s) of image(s) to add a tag for. The name(s) should be formatted as *.gcr.io/project_id/image_path@sha256:<digest> or *.gcr.io/project_id/image_path[:<tag>].

    DEST_IMAGE
        The fully qualified name(s) of image(s) to be the new tag. The name(s) should be formatted as *.gcr.io/project_id/image_path[:<tag>].

GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.

EXAMPLES
Add a tag to another tag:
    $ gcloud container images add-tag gcr.io/myproject/myimage:mytag1
      gcr.io/myproject/myimage:mytag2
Add a tag to a digest
    $ gcloud container images add-tag \
        gcr.io/myproject/myimage@sha256:digest
      gcr.io/myproject/myimage:mytag2
Add a tag to latest
    $ gcloud container images add-tag gcr.io/myproject/myimage
      gcr.io/myproject/myimage:mytag2
Promote a tag to latest
    $ gcloud container images add-tag gcr.io/myproject/myimage:mytag1
      gcr.io/myproject/myimage:latest