聆听风声 点点滴滴都很珍贵!

docker使用时出现的错误


Error response from daemon: conflict: unable to delete 0b1edfbffd27 (must

be forced) - image is refe

在删除docker本地镜像的时候出现这个错误: Error response from daemon: conflict: unable to delete 0b1edfbffd27 (must be forced) - image is refe

sts@Yudi:~/docker$ sudo docker ps -as

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                    PORTS               NAMES                  SIZE
78479ffeba5c        ubuntu              "/bin/bash"         42 hours ago        Exited (0) 42 hours ago                       sharp_wescoff          81 B (virtual 187.7 MB)
0bd2b54678c7        training/webapp     "python app.py"     5 days ago          Exited (0) 5 days ago                         backstabbing_ritchie   0 B (virtual 323.7 MB)
0adbc74a3803        training/webapp     "python app.py"     5 days ago          Exited (143) 5 days ago                       drunk_feynman          0 B (virtual 323.7 MB)

在删除training/webapp

sts@Yudi:~/docker$ sudo docker rm training/webapp
Error response from daemon: conflict: unable to remove repository reference "training/webapp" (must force) - container 0bd2b54678c7 is using its referenced image 54bb4e8718e8
Error: failed to remove images: [training/webapp]

解决方法:

$ sudo docker rm backstabbing_ritchie

发现在docker进行过bash交互使用命令sudo docker ps -as会显示容器,不使用就不会出现只能使用sudo docker image ls显示


Comments

Content