Docker 运行 Ubuntu 不起作用

Docker 运行 Ubuntu 不起作用

我正在尝试在 Ubuntu VM 上启动一个 Ubuntu 容器,每次启动它时,它都会说

dgr@irpsim:~$ docker run ubuntu
Unable to find image 'ubuntu:latest' locally
docker: Error response from daemon: manifest for ubuntu:latest not found.
See 'docker run --help'.

或其他版本也发生同样的情况ubuntu:20.04。许多文档中都打印了相同的命令,并且在我的本地机器上也可以使用,所以我假设这是虚拟机的一些配置问题。奇怪的是,它可以docker run -it fedora工作,其他类似的容器openjdk:latest也可以下载。

有没有什么好的点可以开始调试这个问题?

编辑:深入研究这个问题,可能是因为yes | docker image prune --all --filter "until=4320h"删除了图片。有什么方法可以重新获取它吗?

编辑2:这似乎会影响系统上从未使用过的所有映像。如果我下载旧映像,则可以下载 17.10 之前的所有内容:

docker pull -a ubuntu
10.04: Pulling from library/ubuntu
a3ed95caeb02: Already exists 
86b54f4b6a4e: Pull complete 
Digest: sha256:f6695b2d24dd2e1da0a79fa72459e33505da79939c13ce50e90675c32988ab64
12.04: Pulling from library/ubuntu
d8868e50ac4c: Pull complete 
83251ac64627: Pull complete 
589bba2f1b36: Pull complete 
d62ecaceda39: Pull complete 
6d93b41cfc6b: Pull complete 
Digest: sha256:18305429afa14ea462f810146ba44d4363ae76e4c8dfc38288cf73aa07485005
12.04.5: Pulling from library/ubuntu
Digest: sha256:18305429afa14ea462f810146ba44d4363ae76e4c8dfc38288cf73aa07485005
12.10: Pulling from library/ubuntu
a3ed95caeb02: Already exists 
b3d68acd1381: Pull complete 
6b4d7481ec7a: Pull complete 
6256ff031770: Pull complete 
1a0d911d83d1: Pull complete 
Digest: sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7
13.04: Pulling from library/ubuntu
a3ed95caeb02: Already exists 
727520c5e30b: Pull complete 
2e8f7add78f9: Pull complete 
4600be257a84: Pull complete 
89d0f0874176: Pull complete 
Digest: sha256:bc48dd7075ce920ebbaa4581d3200e9fb3aaec31591061d7e3a280a04ef0248c
13.10: Pulling from library/ubuntu
a3ed95caeb02: Already exists 
0d8710fc57fd: Pull complete 
5037c5cd623d: Pull complete 
83b53423b49f: Pull complete 
e9e8bd3b94ab: Pull complete 
7db00e6b6e5e: Pull complete 
Digest: sha256:403105e61e2d540187da20d837b6a6e92efc3eb4337da9c04c191fb5e28c44dc
14.04: Pulling from library/ubuntu
2e6e20c8e2e6: Pull complete 
0551a797c01d: Pull complete 
512123a864da: Pull complete 
Digest: sha256:64483f3496c1373bfd55348e88694d1c4d0c9b660dee6bfef5e12f43b9933b30
14.04.1: Pulling from library/ubuntu
a3ed95caeb02: Pull complete 
76a4cab4eb20: Pull complete 
d2ff49536f4d: Pull complete 
f94adccdbb9c: Pull complete 
Digest: sha256:2eb231f768446001a7cf9024ec9724cec23f6768e9ccb4e61499718d34621fbe
14.04.2: Pulling from library/ubuntu
f25e451100bc: Pull complete 
2dbe4abf311d: Pull complete 
7ae2bc99836a: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:a1cec70421f71f00c8bdb0adf0226dc548ff5ba9699cbd5fa09acdb68df82a02
14.04.3: Pulling from library/ubuntu
8387d9ff0016: Pull complete 
3b52deaaf0ed: Pull complete 
4bd501fad6de: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:2febbcede4f3eb82ae0dc44518a2e2a7b06a0452685e64e6b13f51b278294780
14.04.4: Pulling from library/ubuntu
96c6a1f3c3b0: Pull complete 
ed40d4bcb313: Pull complete 
b171f9dbc13b: Pull complete 
ccfc4df4fbba: Pull complete 
Digest: sha256:9274d908eb6d9a3784e93290fcc49f3c5618db9e1b0174ee27f9fc75aa3c0fb0
14.04.5: Pulling from library/ubuntu
1d8592394ba1: Pull complete 
01aa7f61ccd1: Pull complete 
5dd2552a960e: Pull complete 
7cbe941c5e3e: Pull complete 
2549ecfb14c6: Pull complete 
Digest: sha256:30204139c6ab96ebd75d72f34db390f28c4decd5e563488b4e485bf979397b67
14.10: Pulling from library/ubuntu
b0efe5c05b4c: Pull complete 
0a1f1b169319: Pull complete 
1ceb0a3c7c48: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:6341c688b4b0b82ec735389b3c97df8cf2831b8cb8bd1856779130a86574ac5c
15.04: Pulling from library/ubuntu
9502adfba7f1: Pull complete 
4332ffb06e4b: Pull complete 
2f937cc07b5f: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:2fb27e433b3ecccea2a14e794875b086711f5d49953ef173d8a03e8707f1510f
15.10: Pulling from library/ubuntu
7dcf5a444392: Pull complete 
759aa75f3cee: Pull complete 
3fa871dc8a2b: Pull complete 
224c42ae46e7: Pull complete 
Digest: sha256:02521a2d079595241c6793b2044f02eecf294034f31d6e235ac4b2b54ffc41f3
16.04: Pulling from library/ubuntu
58690f9b18fc: Pull complete 
b51569e7c507: Pull complete 
da8ef40b9eca: Pull complete 
fb15d46c38dc: Pull complete 
Digest: sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6
16.10: Pulling from library/ubuntu
dca7be20e546: Pull complete 
40bca54f5968: Pull complete 
61464f23390e: Pull complete 
d99f0bcd5dc8: Pull complete 
120db6f90955: Pull complete 
Digest: sha256:8dc9652808dc091400d7d5983949043a9f9c7132b15c14814275d25f94bca18a
17.04: Pulling from library/ubuntu
c2ca09a1934b: Pull complete 
d6c3619d2153: Pull complete 
0efe07335a04: Pull complete 
6b1bb01b3a3b: Pull complete 
43a98c187399: Pull complete 
Digest: sha256:5d41c289942008211c2964bca72800f5c9d5ea5aa4057528da617fb36463d4ab
17.10: Pulling from library/ubuntu
4ccdce43d1e0: Pull complete 
c95f13c88d92: Pull complete 
82656eee95ad: Pull complete 
78ff727be57a: Pull complete 
448bb314afa5: Pull complete 
Digest: sha256:3b811ac794645dfaa47408f4333ac6e433858ff16908965c68f63d5d315acf94
manifest for ubuntu not found

不幸的是,知道了这一点,我仍然不知道为什么这些图像无法下载以及如何解决这个问题。

答案1

您需要重新安装 docker 并确保 docker 版本是最新的。对我来说,从 18.03 升级到 23.01 是可行的。

相关内容