How to remove multiple docker images with the same imageID?

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

    Here is one way :

    Repository and tag data can be provided to "docker rmi" command to remove image if images id are same.

    command

    docker rmi [repository_name1]:[tag1] [repository_name2]:[tag2]
    

    example

    docker rmi test-nginx:latest ubuntu:latest
    

    Note : one needs to name and tag the image appropriately to use the above command effectively for requirement mentioned in the question.

    Refer Docker docs for "docker rmi" command help : here

提交回复
热议问题