How to remove multiple docker images with the same imageID?

后端 未结 8 2134
余生分开走
余生分开走 2021-01-30 20:15

I created a local docker registry and then pull some of my docker images from docker hub and then push them to the local registry. Now I want to remove my local images. But the

8条回答
  •  一个人的身影
    2021-01-30 20:47

    You should try removing images using digest,

        $ docker images --digests
    
        REPOSITORY                     TAG       DIGEST                                                                    IMAGE ID        CREATED         SIZE
        localhost:5000/test/busybox        sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf   4986bf8c1536
    
        $ docker rmi localhost:5000/test/busybox@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf
         Untagged: localhost:5000/test/busybox@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf
    
        Deleted: 4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125
        Deleted: ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2
        Deleted: df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b
    

提交回复
热议问题