docker pull integrity完整性

发布时间 2023-07-05 14:25:37作者: lvmxh

we use ubuntu as example: 

open the ubuntu docker hub, https://hub.docker.com/_/ubuntu 

# with the right sha256, can works, suffix with 20
docker pull ubuntu:jammy@sha256:b060fffe8e1561c9c3e6dea6db487b900100fc26830b9ea2ec966c151ab4c020

# without the right sha256, cannot works, suffix with 21
docker pull ubuntu:jammy@sha256:b060fffe8e1561c9c3e6dea6db487b900100fc26830b9ea2ec966c151ab4c021

 

check the docker image 

 

REF: 

https://stackoverflow.com/questions/25445318/docker-how-do-i-pull-a-specific-build-id  

https://stackoverflow.com/questions/32046334/where-can-i-find-the-sha256-code-of-a-docker-image