Remove Untagged Images From Docker

remove-untagged-images-from-docker','Build的时候出错,会有<none>

➜  parse-server git:(master) docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
<none>                             <none>              4217d1e14b22        43 hours ago        651.3 MB
node                               boron               130ebee906ca        6 days ago          651.3 MB
<none>                             <none>              c8f236c54bef        3 weeks ago         651 MB
angr/angr                          latest              fd8447442e02        4 weeks ago         1.255 GB
maven                              latest              7addddbdd730        7 weeks ago         651 MB
bruntonspall/security-web          latest              5a11b8c1f658        8 weeks ago         400.8 MB
bruntonspall/security-paymentapi   latest              d2d7e90914c2        8 weeks ago         413.5 MB
bruntonspall/security-userapi      latest              3ddc47f171e9        8 weeks ago         413.5 MB
nginx                              latest              4a88d06e26f4        8 weeks ago         183.5 MB
debian                             latest              031143c1c662        11 weeks ago        125.1 MB
ubuntu                             latest              bd3d4369aebc        11 weeks ago        126.6 MB
abstractj/drozer                   latest              c7318ed47f19        3 months ago        1.166 GB
owasp/zap2docker-stable            latest              a774bdc65502        5 months ago        1.557 GB
google/python-runtime              latest              f3653b481099        20 months ago       380.3 MB

删除无用的<none>:

➜  parse-server git:(master) docker rm $(docker ps -a -q)
➜  parse-server git:(master) docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Show Comments