我有两台裸机,每台都运行 Ubuntu LTS 18.04,并docker --version报告 20.10.7。
在每个上,我都提取了ubuntu:22.04的最新映像。两者都逐字报告:
$ docker pull ubuntu:22.04
22.04: Pulling from library/ubuntu
Digest: sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d
Status: Image is up to date for ubuntu:22.04
docker.io/library/ubuntu:22.04
$ docker images | grep 'ubuntu\s*22.04'
ubuntu 22.04 d2e4e1f51132 2 weeks ago 77.8MB
Run Code Online (Sandbox Code Playgroud)
但是:在一台主机上,apt update容器内的容器工作正常 - 在另一台主机上,我们会收到返回代码 100 的错误:
$ docker run -it ubuntu:22.04
root@81ddacc04c9f:/# apt update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [84.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates …Run Code Online (Sandbox Code Playgroud)