江明涛的博客
《Docker 》存在多个相同的IMAGE ID镜像时, 删除镜像失败
《Docker 》存在多个相同的IMAGE ID镜像时, 删除镜像失败

《Docker 》存在多个相同的IMAGE ID镜像时, 删除镜像失败

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
gateway/dev         last                e56c11903417        2 hours ago         692MB
gateway/dev         latest              e56c11903417        2 hours ago         692MB
java                8                   d23bdf5b1b1b        4 years ago         643MB
# docker rmi e56c11903417
Error response from daemon: conflict: unable to delete e56c11903417 (must be forced) - image is referenced in multiple repositories

使用 tag的方式删除

# docker rmi gateway/dev:last
Untagged: gateway/dev:last
# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
gateway/dev         latest              e56c11903417        2 hours ago         692MB
java                8                   d23bdf5b1b1b        4 years ago         643MB

上次更新时间 13 3 月, 2023 at 09:59 上午