Created
February 23, 2017 23:45
-
-
Save DirkHeinke/4d8d271868054176185edebedbc196c3 to your computer and use it in GitHub Desktop.
This script shows all repositories (images) from a docker registry (v2) with token auth (e.g. portus). Needs jq in the same folder.
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
TOKEN=$(curl --silent -u dirk:xxx https://portus.example.com/v2/token\?service\=docker.example.com\&scope\=registry:catalog:\* | ./jq -r .token) | |
curl --silent -H "Authorization: Bearer $TOKEN" https://docker.example.com/v2/_catalog | ./jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment