gpt4 book ai didi

ubuntu - 终止容器后无法删除 Docker 的镜像

转载 作者:行者123 更新时间:2023-12-02 20:40:01 24 4
gpt4 key购买 nike

我是 docker 的新手。
我创建了一个容器并在下面部署了一些图像。

stratos@Dev-PC:/media/sf_docker_vm/couchdb-cartridge$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
10.0.2.15:5042/couchdb-cartridge latest 1bbc29d7cf4a 41 hours ago 785.2 MB
couchdb-cartridge latest 1bbc29d7cf4a 41 hours ago 785.2 MB
192.168.57.30:5042/couchdb-cartridge latest 1bbc29d7cf4a 41 hours ago 785.2 MB
192.168.57.30:5042/tomcat-cartridge latest a25a79ecc37f 3 weeks ago 463.4 MB
tomcat-cartridge latest a25a79ecc37f 3 weeks ago 463.4 MB
192.168.57.30:5042/mysql-cartridge latest ab1dac84c735 3 weeks ago 802 MB
mysql-cartridge latest ab1dac84c735 3 weeks ago 802 MB
192.168.57.30:5042/php-cartridge latest 809d2a1ebaf0 3 weeks ago 668.3 MB
php-cartridge latest 809d2a1ebaf0 3 weeks ago 668.3 MB
docker-registry latest a158e64ae76a 5 weeks ago 596.2 MB
docker-busybox latest 2eb418e07fd5 5 weeks ago 4.964 MB
10.0.2.15:5042/docker-busybox latest 2eb418e07fd5 5 weeks ago 4.964 MB
ubuntu 12.04 822a01ae9a15 6 weeks ago 108.1 MB

我想删除 1bbc29d7cf4a 图像,它想让我删除它说:
stratos@Dev-PC:/media/sf_docker_vm/couchdb-cartridge$ docker rmi 1bbc29d7cf4a
Error: Conflict, cannot delete image 1bbc29d7cf4a because it is tagged in multiple repositories
2014/09/26 12:38:50 Error: failed to remove one or more images

我如何遵循 question并且我仍然在错误之上。贝娄是我遵循的步骤。
docker ps
docker stop <containerid>
docker rm <containerid>
docker rmi <imageid>

有人可以帮我删除这些图像吗?

最佳答案

原因就在错误消息中:

cannot delete image 1bbc29d7cf4a because it is tagged in multiple repositories

使用标签删除:
docker rmi 192.168.57.30:5042/couchdb-cartridge 10.0.2.15:5042/couchdb-cartridge couchdb-cartridge

或者只指定 -frmi命令:
docker rmi -f 1bbc29d7cf4a

关于ubuntu - 终止容器后无法删除 Docker 的镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26054391/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com