-
-
Save dreadjr/916fa5f1f149e75567f17455df4f1958 to your computer and use it in GitHub Desktop.
Docker Registry v2 API list images and tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assumes htpass authentication | |
registry_server='docker.mycloud.com' | |
username='bob' | |
# List all images (i.e. repositories) | |
curl -k -X GET "https://$registry_server/v2/_catalog" -u $username -H "Accept: application/json" | |
Enter host password for user 'bob': | |
{"repositories":["app-base","ubuntu","cache-base"]} | |
# Get all tags (versions) for a given image | |
image='app-base' | |
curl -k -X GET "https://$registry_server/v2/$image/tags/list" -u $username -H "Accept: application/json" | |
Enter host password for user 'bob': | |
{"name":"app-base","tags":["v3","latest","v4","v1","v2","v5"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment