Explanation between image tags and real path to image

Hi,

I am torn with understanding of why below command show specific tag, however when I try to list the images it shows zero.

student0987$ gcloud container images list --repository=us-east1-docker.pkg.dev/my-repository/my-docker/path/docker-sample
Listed 0 items

student0987$ gcloud container images list-tags us-east1-docker.pkg.dev/my-repository/my-docker/path/docker-sample  | grep 9.19.100
TAGS: 9.19.100,1902

On the other words, if I am able to see the tag for the above image, why I can not see the image itself when I list all images in that path? And finally where is that image located if not under the first command output? How to find it?

Solved Solved
1 1 75
1 ACCEPTED SOLUTION

Hello @Kreg,

Welcome to the Google Cloud Community!

gcloud container images list --repository=..

This command displays all Docker images in a specific repository. If it shows "Listed 0 items," no images are present at the specified path, possibly due to permission issues, an incorrect path, or simply no images being there.

gcloud container images list-tags ...

This command shows all tags for a specific image, confirming its existence. The tags, like 9.19.100 and 1902, refer to different versions or builds of the image.

Make sure the paths in both commands are correct to avoid errors. Also, ensure your Google Cloud account has the necessary permissions to access the images.

To verify you're checking the correct repository, use:

gcloud artifacts repositories list --location=us-east1

For more information, please check this documentation.

View solution in original post

1 REPLY 1

Hello @Kreg,

Welcome to the Google Cloud Community!

gcloud container images list --repository=..

This command displays all Docker images in a specific repository. If it shows "Listed 0 items," no images are present at the specified path, possibly due to permission issues, an incorrect path, or simply no images being there.

gcloud container images list-tags ...

This command shows all tags for a specific image, confirming its existence. The tags, like 9.19.100 and 1902, refer to different versions or builds of the image.

Make sure the paths in both commands are correct to avoid errors. Also, ensure your Google Cloud account has the necessary permissions to access the images.

To verify you're checking the correct repository, use:

gcloud artifacts repositories list --location=us-east1

For more information, please check this documentation.