how to physically remove untagged docker images

前端 未结 6 1145
盖世英雄少女心
盖世英雄少女心 2021-02-04 02:39

when I run a command such as sudo docker rmi me/myimage I get the responce ...image untagged, but, when I rerun sudo docker images I can see that this \"untagged\" image i

6条回答
  •  甜味超标
    2021-02-04 03:32

    You should be able to remove untagged Docker images using the "dangling=true" flag:

    sudo docker rmi $(sudo docker images -f "dangling=true" -q)
    

    source:

    https://docs.docker.com/engine/reference/commandline/images/

提交回复
热议问题