美文网首页
docker| 删除镜像报错

docker| 删除镜像报错

作者: 沙漠中的猴 | 来源:发表于2018-03-29 20:49 被阅读0次

    执行docker rmi $(docker images -aq)时出现:

    Error response from daemon: conflict: unable to delete b023f9be0771 (must be forced) - image is referenced in multiple repositories
    Error response from daemon: conflict: unable to delete b023f9be0771 (must be forced) - image is referenced in multiple repositories
    Error response from daemon: conflict: unable to delete 82098abb1a17 (must be forced) - image is referenced in multiple repositories
    Error response from daemon: conflict: unable to delete 82098abb1a17 (must be forced) - image is referenced in multiple repositories
    Error response from daemon: conflict: unable to delete c8b4909d8d46 (must be forced) - image is referenced in multiple repositories
    Error response from daemon: conflict: unable to delete c8b4909d8d46 (must be forced) - image is referenced in multiple repositories
    

    当我再执行docker images时,发现相同的Image ID有两个不同的Tag。

    docker images
    REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
    hyperledger/fabric-peer        latest              b023f9be0771        13 days ago         187MB
    hyperledger/fabric-peer        x86_64-1.1.0        b023f9be0771        13 days ago         187MB
    hyperledger/fabric-javaenv     latest              82098abb1a17        13 days ago         1.52GB
    hyperledger/fabric-javaenv     x86_64-1.1.0        82098abb1a17        13 days ago         1.52GB
    hyperledger/fabric-ccenv       latest              c8b4909d8d46        13 days ago         1.39GB
    hyperledger/fabric-ccenv       x86_64-1.1.0        c8b4909d8d46        13 days ago         1.39GB
    

    使用仓库加Tag的方式来删除:

    docker rmi hyperledger/fabric-peer:latest 
    

    之后再用docker rmi $(docker images -aq)来删除。

    相关文章

      网友评论

          本文标题:docker| 删除镜像报错

          本文链接:https://www.haomeiwen.com/subject/rhxvcftx.html