Skip to content

Commit

Permalink
Merge pull request #345 from infosiftr/tag-details-pull-by-digest
Browse files Browse the repository at this point in the history
Add back "pull by digest" to the tag-details page...
  • Loading branch information
tianon committed Sep 18, 2015
2 parents 3967057 + 9e947fd commit 01229fb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .template-helpers/generate-tag-details.pl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ sub get_manifest {

my $manifestTx = ua_req(get => "https://registry-1.docker.io/v2/$repo/manifests/$tag" => $authorizationHeader);
die "failed to get manifest for $image" unless $manifestTx->success;
return $manifests{$image} = $manifestTx->res->json;
return (
$manifestTx->res->headers->header('Docker-Content-Digest'),
$manifests{$image} = $manifestTx->res->json,
);
}

sub get_blob_headers {
Expand Down Expand Up @@ -161,7 +164,13 @@ sub date {
say '## `' . $image . '`';
my ($repo, $tag) = split_image_name($image);

my $manifest = get_manifest($repo, $tag);
my ($digest, $manifest) = get_manifest($repo, $tag);

print "\n";
say '```console';
say '$ docker pull ' . $repo . '@' . $digest;
say '```';

my %parentChild;
my %totals = (
virtual_size => 0,
Expand Down

0 comments on commit 01229fb

Please sign in to comment.