Skip to content

Instantly share code, notes, and snippets.

@baronfel
Created June 19, 2023 17:38
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 baronfel/addd5f1950ad27eb1977649f3c67abbd to your computer and use it in GitHub Desktop.
Save baronfel/addd5f1950ad27eb1977649f3c67abbd to your computer and use it in GitHub Desktop.
HTTP snippet for docker manifest investigations
@registry = registry-1.docker.io
@authEndpoint = auth.docker.io
@authService = registry.docker.io
@repo = library/ubuntu
@tag = jammy
# @name authenticate
GET https://{{authEndpoint}}/token?service={{authService}}&scope=repository:{{repo}}:pull
###
@auth = Bearer {{authenticate.response.body.access_token}}
# @name getManifestList
GET {{registry}}/v2/{{repo}}/manifests/{{tag}}
Authorization: {{auth}}
Accept: application/vnd.oci.image.index.v1+json
###
@manifestDigest = {{getManifestList.response.body.manifests[0].digest}}
# @name getManifest
GET {{registry}}/v2/{{repo}}/manifests/{{manifestDigest}}
Authorization: {{auth}}
Accept: application/vnd.oci.image.manifest.v1+json
###
@configDigest = {{getManifest.response.body.config.digest}}
# @name getConfig
GET {{registry}}/v2/{{repo}}/blobs/{{configDigest}}
Authorization: {{auth}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment