How is the Docker image digest calculated?

The digest is a hash file sha256 of the docker image, but the image is not one file, but a set of layers. I assumed that the digest was a sha256 hash over the image manifest file, but I calculated the sha256 hash file from numerous manifest files and compared the result with the docker-digest providing the image, and they are diff. So what exactly is the sha256 hash for creating an Image digest value?

+4
source share
2 answers

Based on my adventures in the Docker source, it seems that the digest is a SHA256 (default) JSON string that represents the image configuration.

, .

+1

Image Digest - . , , caclutae .

https://docs.docker.com/registry/spec/api/#content-digests

HEADER DIGEST

http, Docker-Content-Digest. , . blobs blob. , JWS. , , , .

0

Source: https://habr.com/ru/post/1653483/


All Articles