how to physically remove untagged docker images

前端 未结 6 1085
盖世英雄少女心
盖世英雄少女心 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:21

    If John Petrone solution doesn't work, try removing those images referring explicitly the IMAGE ID you see when you run docker images. You can remove all of them with one command

    for i insudo docker images | grep \ | awk '{print $3}'; do sudo docker rmi $i; done

    PD: I don't know John Petrone answer. It works nicely with Docker 1.4.1

提交回复
热议问题