Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Show digest of pushed images
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Mar 11, 2021
1 parent a4d580e commit 9c9c523
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion container/go/cmd/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,16 @@ func main() {
log.Printf("Destination %s was resolved to %s after stamping.", *dst, stamped)
}

digest, err := img.Digest()
if err != nil {
log.Fatalf("Failed to digest image: %v", err)
}

if err := push(stamped, img); err != nil {
log.Fatalf("Error pushing image to %s: %v", stamped, err)
}

log.Printf("Successfully pushed %s image to %s", *format, stamped)
log.Printf("Successfully pushed %s image to %s (digest: %s)", *format, stamped, digest)
}

// digestExists checks whether an image's digest exists in a repository.
Expand Down

0 comments on commit 9c9c523

Please sign in to comment.