How to remove multiple docker images with the same imageID?

后端 未结 8 2133
余生分开走
余生分开走 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:44

    I just checked in the Docker docs and i think this is something also can be done

    rmi

    You can remove an image using its short or long ID, its tag, or its digest. If an image has one or more tag or digest reference, you must remove all of them before the image is removed.

    so rather than using ID u can do something like this ---

    $ docker rmi test1 Untagged: test1:latest $ docker rmi test2 Untagged: test2:latest

提交回复
热议问题