Tag a Docker image in Google Container Registry with additional tag via command line
I am trying to tag a Docker image sitting in Google Container Registry but am not having any luck. If the image were sitting on my local machine, i could do something like:
docker tag my-image:existing-tag my-image:new-tag
This would result in a second tag for my image. However, in Google Container Registry, I cannot simply use the
gcloud wrapper to do so. For example:
gcloud docker -- tag gcr.io/my-project/my-image:existing-tag gcr.io/my-project/my-image:new-tag
This command will not work because even though I am running with
gcloud, I get the following response:
Error response from daemon: no such id gcr.io/my-project/my-image:existing-tag
Is what I am attempting possible, and how would one accomplish it?
One Solution collect form web for “Tag a Docker image in Google Container Registry with additional tag via command line”
Just after posting, I discovered I needed to update to the latest
gcloud and then could run
gcloud container images add-tag. Problem solved.