我正在尝试使用docker rmi <image>
命令删除docker映像,但是出现“ No such image”错误。
以下是我执行的命令序列。为什么它显示我有一个ubuntu映像,但不允许我删除它?我在CentOS 8上运行Docker版本18.06.3-ce。
[root@localhost student]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost student]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost student]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 549b9b86cb8d 4 days ago 64.2MB
centos latest 0f3e07c0138f 2 months ago 220MB
[root@localhost student]# docker rmi ubuntu
Error: No such image: ubuntu
[root@localhost student]#
如果您只是说它正在ubuntu
寻找ubuntu:latest
您所拥有的ubuntu:18.04
。所以尝试一下docker rmi ubuntu:18.04
。您也可以按ID删除:docker rmi 549b9b86cb8d
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句