Skip to content

Instantly share code, notes, and snippets.

@dreampuf
Created September 28, 2018 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreampuf/ad5b6b098ccf0c5195332434662acabc to your computer and use it in GitHub Desktop.
Save dreampuf/ad5b6b098ccf0c5195332434662acabc to your computer and use it in GitHub Desktop.
Docker Image Repository Ingest
token=$(curl -s -H "Authorization: Basic $(echo -n "USERNAME:PASSWORD" | base64)" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:sebp/elk:pull" | jq -r ".token")
configsha=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer ${token}" https://registry-1.docker.io/v2/sebp/elk/manifests/latest | jq -r .config.digest)
curl -sL -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer ${token}" https://registry-1.docker.io/v2/sebp/elk/blobs/sha256:4b52312ebe8d44f438eeecf08da2b4460250bd574642cc124bc5eaac4f1ebfc5 | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment