此命令在 CentOS 服务器上失败,但在基于 Ubuntu 的笔记本电脑上成功:
# server, CentOS based
$ docker pull jwilder/nginx-proxy:latest
Error response from daemon: manifest for jwilder/nginx-proxy:latest not found
# laptop, Ubuntu based
$ docker pull jwilder/nginx-proxy:latest
latest: Pulling from jwilder/nginx-proxy
Digest: sha256:5069d54302a4982681892b11fda72f6735d8f65bda38ffedeceb767fa28e9d14
Status: Image is up to date for jwilder/nginx-proxy:latest
docker.io/jwilder/nginx-proxy:latest
在无法拉取该图像的 CentOS 服务器上,我可以正常拉取其他图像。
$ docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
325d69979d33: Pull complete
Digest: sha256:560af6915bfc8d7630e50e212e08242d37b63bd5c1ccf9bd4acccf116e262d5b
Status: Downloaded newer image for busybox:latest
我尝试在服务器上明确指定平台(我不是管理员),但出现此错误:
$ docker pull --platform linux/amd64 jwilder/nginx-proxy:latest
"--platform" is only supported on a Docker daemon with experimental features enabled
系统之间存在 docker 版本差异,我无法立即修复。我对 GPT4 的最佳猜测是这里存在版本冲突。如果这在经验丰富的人看来是可能的,我很想听听第二种意见。
CentOS服务器运行的是这个docker版本:
$ docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:20:16 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:23:58 2018
OS/Arch: linux/amd64
Experimental: false
我的笔记本电脑运行的是此版本:
$ docker version
Client: Docker Engine - Community
Version: 24.0.1
API version: 1.43
Go version: go1.20.4
Git commit: 6802122
Built: Fri May 19 18:06:21 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.1
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 463850e
Built: Fri May 19 18:06:21 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
答案1
将操作系统替换为 Ubuntu 22.04 并将 docker 升级到最新的 24.0.1 版本后,此问题消失了。我怀疑 docker 升级是解决方案,但我不确定。