Skip to content

Instantly share code, notes, and snippets.

@DirkHeinke
Created February 23, 2017 23:45
Show Gist options
  • Save DirkHeinke/4d8d271868054176185edebedbc196c3 to your computer and use it in GitHub Desktop.
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.
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