https://hub.docker.com/_/python/tags?page=1&name=3.10-bullseye
上面是 docker hub 中,python:3.10-bullseye 的 digest 信息
下面是刚刚执行 docker pull python:3.10-bullseye 输出的 digest 信息
╰─➤ docker pull python:3.10-bullseye
3.10-bullseye: Pulling from library/python
ddf874abf16c: Pull complete
5c1459d3ab8b: Pull complete
29ab00e7798a: Pull complete
7883a473306c: Pull complete
c3ab175b762c: Pull complete
9f11cb399571: Pull complete
cfb416449119: Pull complete
1365a3c2b71e: Pull complete
Digest: sha256:e917e3e93525f97fc343135efc2b3295a11b02450ff8d4eeaff25323c73caf6b
Status: Downloaded newer image for python:3.10-bullseye
docker.io/library/python:3.10-bullseye
可以看到,本地拉取的 Digest 是 e917e3e93525f97fc343135efc2b3295a11b02450ff8d4eeaff25323c73caf6b
是不是用了源?
可以在拉取镜像时候指定digest,如果找不到镜像。就用中转服务器自己push一个最新版的到国内仓库,然后再去拉取。