Skip to content

Instantly share code, notes, and snippets.

@leoh0
Last active March 21, 2022 12:47
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 leoh0/04018a42cc8c4f2102b614b0c93577be to your computer and use it in GitHub Desktop.
Save leoh0/04018a42cc8c4f2102b614b0c93577be to your computer and use it in GitHub Desktop.
curl -fSL --progress -H "Authorization: Bearer $(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:leoh0/debs:pull" | grep "token" | sed 's/.*"token": "\([^"]*\)".*/\1/g')" https://registry-1.docker.io/v2/leoh0/debs/blobs/sha256:766e5ecec693332a41503fce52bef730fd1470c00068b1e2e5ab8abfdb79b34f | tar xzvf -
https://raw.githubusercontent.com/moby/moby/master/contrib/download-frozen-image-v2.sh
curl -fSL --progress -H "Authorization: Bearer $(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:leoh0/files:pull" | grep \"token\" | sed 's/.*"token": "\([^"]*\)".*/\1/g')" https://registry-1.docker.io/v2/leoh0/files/blobs/sha256:86740787609b1c5e5af2bce0f6c0cca1a10a5deb0fc4e2a284372eb6d90355f9 | tar xzvf -
netsh winhttp set proxy ""
$r = Invoke-RestMethod -Uri "https://auth.docker.io/token?service=registry.docker.io&scope=repository:leoh0/files:pull"
$t = $r.token
$h = @{
'Authorization' = "Bearer $t"
}
Invoke-RestMethod -Headers $h -Uri https://registry-1.docker.io/v2/leoh0/files/blobs/sha256:86740787609b1c5e5af2bce0f6c0cca1a10a5deb0fc4e2a284372eb6d90355f9 -OutFile file.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment