Skip to content

Instantly share code, notes, and snippets.

@diogomonica
Created August 15, 2015 19:22
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 diogomonica/a419a9ea0788fe05753c to your computer and use it in GitHub Desktop.
Save diogomonica/a419a9ea0788fe05753c to your computer and use it in GitHub Desktop.
#! /bin/bash
hash="$(cat `grep -rl '"name": "dolly"' /var/lib/registry/docker/registry/v2/` | grep Sum | head -n1 | cut -d':' -f3 | cut -d'"' -f1)"
firstchars="$(echo $hash | head -c 2)"
data="/var/lib/registry/docker/registry/v2/blobs/sha256/$firstchars/$hash/"
echo $data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment