docker push 指定架构问题。

10 天前
 justdoit123

想要把一些镜像 push 到自己搭建的私有源上。正常的步骤应该是:

  1. 从公开源拉取镜像 docker pull xxx-public/redis:v1.2.3
  2. 重新打一个 tag ,指向私有源 docker tag xxx-public/redis:v1.2.3 yyy-private/redis:v1.2.3
  3. 推送到私有源上。docker push yyy-private/redis:v1.2.3

但是,镜像是多架构的。而默认情况下,pull 只会拉取本机对应的 CPU 架构。因此导致上述第 3 步失败:

❯ docker push yyy-private/redis:v1.2.3
The push refers to repository [yyy-private]
missing content: content digest sha256:b5cd220f882a6d678d2f85acfa9331c0ab87ca584ac9825556171d2460296b55: not found
Note: You're trying to push a manifest list/index which references multiple platform specific manifests, but not all of them are available locally or available to the remote repository.
Make sure you have all the referenced content and try again.

两个问题:

  1. 是不是只有通过 docker manifest inspect 命令,查看一个镜像有多少种架构。然后把所有架构的版本都 pull 到本地后,才能 push 到私有源上?

  2. 镜像的完整 manifest 存在哪里?运行 docker manifest inspect 的时候,感觉还是发起了一次网络请求。

879 次点击
所在节点    Docker
4 条回复
justdoit123
10 天前
forte
10 天前
kimera
10 天前
justdoit123
9 天前
感谢~ @forte @kimera 我去尝试一下。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1071099

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX