【问题标题】:removing docker image (docker image rm don't work)删除 docker 镜像(docker image rm 不起作用)
【发布时间】:2022-10-24 16:45:22
【问题描述】:

更改文件名并删除并重新安装 docker 后,您好(我不得不选择另一个包) 我从旧安装中删除图像时遇到问题

docker container  ls
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

(没有什么)

docker image list
REPOSITORY              TAG       IMAGE ID       CREATED       SIZE
linuxserver/bookstack   latest    de5fa1566aec   10 days ago   262MB

我的尝试:

docker image rm linuxserver/bookstack
Error: No such image: linuxserver/bookstack

docker image rm linuxserver/bookstack:latest
Error: No such image: linuxserver/bookstack:latest

docker image rm de5fa1566aec
Error: No such image: de5fa1566aec

docker rmi -f linuxserver/bookstack:latest
Error: No such image: linuxserver/bookstack:latest

docker rmi -f linuxserver/bookstack
Error: No such image: linuxserver/bookstack

docker rmi -f de5fa1566aec
Error: No such image: de5fa1566aec

另一个想法:

docker system prune

警告!这将删除:

  • 所有停止的容器
  • 至少一个容器未使用所有网络
  • 所有悬空图像
  • 所有悬空构建缓存

你确定你要继续吗? [y/N] y 总回收空间:0B

docker image ls
REPOSITORY              TAG       IMAGE ID       CREATED       SIZE
linuxserver/bookstack   latest    de5fa1566aec   10 days ago   262MB

覆盖

docker image import bookstack.docker

docker image ls
REPOSITORY              TAG       IMAGE ID       CREATED          SIZE
<none>                  <none>    47f974b4ca36   11 seconds ago   278MB
linuxserver/bookstack   latest    de5fa1566aec   11 days ago      262MB

我的最后一击

docker rmi $(docker images -a -q)
Error: No such image: de5fa1566aec

Slava Kuravsky 解决方案

docker tag busybox:latest linuxserver/bookstack:latest

docker image ls
REPOSITORY              TAG       IMAGE ID       CREATED       SIZE
<none>                  <none>    47f9*   2 days ago    278MB
linuxserver/bookstack   latest    de5f*   13 days ago   262MB
busybox                 latest    ff4a*   2 weeks ago   1.24MB
linuxserver/bookstack   latest    ff4a*   2 weeks ago   1.24MB

docker system prune -f
Deleted Images:
deleted: sha256:47f9****
deleted: sha256:29ef****

docker rmi -f linuxserver/bookstack:latest
enter code here

 docker image ls
REPOSITORY              TAG       IMAGE ID       CREATED       SIZE
linuxserver/bookstack   latest    de5fa***   13 days ago   262MB
busybox                 latest    ff4a8***   2 weeks ago   1.24MB

我能做些什么?

【问题讨论】:

    标签: linux docker image redhat


    【解决方案1】:

    尝试再次拉出此图像并覆盖损坏的参考:docker pull linuxserver/bookstack:latest

    【讨论】:

    • docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE &lt;none&gt; &lt;none&gt; 47f974b4ca36 11 seconds ago 278MB linuxserver/bookstack latest de5fa1566aec 11 days ago 262MB
    • 它在原始问题中编辑得很好
    • 您也可以尝试将一些现有图像重命名为 bookstack:docker pull busybox:latest; docker tag busybox:latest linuxserver/bookstack:latest; docker system prune -f; docker rmi -f linuxserver/bookstack:latest
    猜你喜欢
    • 1970-01-01
    • 2022-12-26
    • 1970-01-01
    • 2023-03-20
    • 2014-05-21
    • 2014-02-19
    • 2020-11-14
    • 2020-11-12
    • 2017-11-30
    相关资源
    最近更新 更多