2

This is related to my previous question. Cannot deploy Cloud Functions with Cloud Build saying "GOOGLE_MANIFEST_DANGLING_TAG: Manifest is still referenced by tag: latest"

I've read that there is an issue in CLI https://github.com/GoogleCloudPlatform/docker-credential-gcr/issues/73

attempting to delete the manifest first before removing the tags

So I'm trying to untag the cache image. But if I do

gcloud container images untag PATH/cashe@sha256:<digest>:latest
#PATH~DIGEST for sure has been copied from console

there appears an error message saying

ERROR: (gcloud.container.images.untag) digest must be of the form "sha256:<digest>".

Looks to me it's trying to read strings next to the last :(colon) as digest and as tag name at the same time.

By the way this worked

gcloud container images untag PATH/cashe:latest --quiet

though there is a WARNING : Successfully resolved tag to sha256, but it is recommended to use sha256 directly.

1 Answers1

1

Tags are a way to 'label' specific image (manifests) in a repository. The tag may only be used once per image in a repository.

gcloud container images untag requires *.gcr.io/PROJECT_ID/IMAGE_PATH:TAG

You should not include the image's digest (== SHA256 of the manifest). Although including the digest does uniquely identify the image that's tagged, it's redundant; the repository is likely mapping tags (e.g. latest) to image digests.

You should use:

gcloud container images untag ${PATH}/cashe:latest
DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • 1
    Hi @DazWilkin Thank you for your answer. > The tag may only be used once per image in a repository. So I learned after a while. But considering what WARNING message is saying and the fact that I needed `--quiet`, I kept this up. Sad thing is, even if I remove the tag or delete the cache image, the deployment still fails with the same error. – Kantumrobot Feb 02 '22 at 06:40