HiveBrain v1.2.0
Get Started
← Back to all entries
snippetdockerMinor

How to verify docker sha256 on hub.docker with docker?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
dockerwithverifyhubhowsha256

Problem

Given an image like this one

I want to be able to verify that the image I have matches

DIGEST:sha256:6889517fd553d36ed5743827cd81c8f94438bd2502db57e9bbfbfac73e746f5b

How can this be done in docker's command line tool?

Solution

Use this command

docker images --digests


You'll get this output

REPOSITORY    TAG       DIGEST                                                                    IMAGE ID       CREATED        SIZE
hello-world   latest    sha256:80f31da1ac7b312ba29d65080fddf797dd76acfb870e677f390d5acba9741b17   feb5d9fea6a5   8 months ago   13.3kB

Code Snippets

docker images --digests
REPOSITORY    TAG       DIGEST                                                                    IMAGE ID       CREATED        SIZE
hello-world   latest    sha256:80f31da1ac7b312ba29d65080fddf797dd76acfb870e677f390d5acba9741b17   feb5d9fea6a5   8 months ago   13.3kB

Context

StackExchange DevOps Q#16036, answer score: 3

Revisions (0)

No revisions yet.