查看现有镜像
➜ safeline docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
chaitin/safeline-tengine 1.5.1 25a6146e6aed 13 hours ago 119MB
chaitin/safeline-tengine latest 25a6146e6aed 13 hours ago 119MB
chaitin/safeline-mgt-api 1.5.1 c32c8a295cef 13 hours ago 510MB
chaitin/safeline-mgt-api latest c32c8a295cef 13 hours ago 510MB
chaitin/safeline-mario 1.5.1 97f689e4d3a6 13 hours ago 140MB
chaitin/safeline-mario latest 97f689e4d3a6 13 hours ago 140MB
chaitin/safeline-tengine <none> d0e867c2d3a9 16 hours ago 119MB
chaitin/safeline-mgt-api <none> bd3bdff17e6c 16 hours ago 510MB
chaitin/safeline-mario <none> 2cf6d46a38a4 16 hours ago 140MB
chaitin/safeline-detector 1.5.1 b55e0d111329 17 hours ago 230MB
chaitin/safeline-detector latest b55e0d111329 17 hours ago 230MB
chaitin/safeline-detector <none> a749c4a748de 17 hours ago 230MB
jc21/nginx-proxy-manager latest 219fa0ba0547 8 days ago 843MB
postgres 15.2 bf700010ce28 2 weeks ago 379MB
alpine latest 9ed4aefc74f6 7 weeks ago 7.05MB
c0ny1/xss-challenge-tour latest 53c427561d77 3 years ago 356MB
area39/webug latest ea6562434bbd 3 years ago 493MB
c0ny1/upload-labs latest aa4fdd1dd211 4 years ago 472MB
c0ny1/sqli-labs latest 183293ae4238 5 years ago 431MB
➜ safeline
通过grep和awk命令取出TAG为none的images ID
➜ safeline docker images | grep "none" | awk '{print $3}'
d0e867c2d3a9
bd3bdff17e6c
2cf6d46a38a4
a749c4a748de
➜ safeline
通过docker image rm 命令删除
➜ safeline docker image rm `docker images | grep "none" | awk '{print $3}'`
Untagged: chaitin/safeline-tengine@sha256:59b3d502c626e1ad5f1babc4254de21372d471cb1f19855260a33078fddb2b67
Deleted: sha256:d0e867c2d3a904077bc3f771316a3dbeb98ea9f49a3eb66fea177d6c95869a5c
Deleted: sha256:1ec301a2c111062c7d6ab431c214931ba67831ec56e497eab7172fabf4b66af9
Deleted: sha256:87a763184e3818c840d5b3f4dab49ace788850fc94e713283465049bcba043c4
Deleted: sha256:4b682b5ce59f1adb7595b3230c4d4eb0e778b6a8c4d3505c91181f282bfe8ca4
Untagged: chaitin/safeline-mgt-api@sha256:b464fa6bc22e126bde8689e81feb84e58f0e3850ddec3bd7ac70e9e3c5cf9382
Deleted: sha256:bd3bdff17e6ccc1fc83f35f3d2aefa56621140634979aa6e53ce32819e4c160f
Deleted: sha256:7d3df84bfc96bcb503da83ca4f97c4395c272404bb45de80d1e7d570024f8eca
Deleted: sha256:d527a8d8cb7b570e4692d42980bf22926edd92794898e4344a9d99e615031c15
Deleted: sha256:d58cfea0a56c97aa13f47c7f660efe7db6df8b967bcca9167d771e09d1538dc3
Deleted: sha256:52d921e7243d9a520623fef15d28cf3b1ce5f92d2dd7a88b53a096179061c6a7
Untagged: chaitin/safeline-mario@sha256:1268d92e1e2fa39c40f323f5541c41f0c3ac10ab3c7d9782e60a32fea6364c7a
Deleted: sha256:2cf6d46a38a46d64f7e479f6487d1d9cb1b15fe5f54c4f177ef942e2cf82b8c4
Deleted: sha256:bd44fc359e2abc397b29697f872b381a5bb6deacdcd1925a37d591813bcd4e10
Untagged: chaitin/safeline-detector@sha256:4aad591aaf6c8825be4e88b2db57b40a9cdd85380b079ace4b364f32b37eea80
Deleted: sha256:a749c4a748de12553b21d6724a86f8ea3a79591d219f325c26eb7999c9f01897
➜ safeline
查看删除none后的docker镜像
➜ safeline docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
chaitin/safeline-tengine 1.5.1 25a6146e6aed 13 hours ago 119MB
chaitin/safeline-tengine latest 25a6146e6aed 13 hours ago 119MB
chaitin/safeline-mgt-api 1.5.1 c32c8a295cef 13 hours ago 510MB
chaitin/safeline-mgt-api latest c32c8a295cef 13 hours ago 510MB
chaitin/safeline-mario 1.5.1 97f689e4d3a6 13 hours ago 140MB
chaitin/safeline-mario latest 97f689e4d3a6 13 hours ago 140MB
chaitin/safeline-detector 1.5.1 b55e0d111329 17 hours ago 230MB
chaitin/safeline-detector latest b55e0d111329 17 hours ago 230MB
jc21/nginx-proxy-manager latest 219fa0ba0547 8 days ago 843MB
postgres 15.2 bf700010ce28 2 weeks ago 379MB
alpine latest 9ed4aefc74f6 7 weeks ago 7.05MB
c0ny1/xss-challenge-tour latest 53c427561d77 3 years ago 356MB
area39/webug latest ea6562434bbd 3 years ago 493MB
c0ny1/upload-labs latest aa4fdd1dd211 4 years ago 472MB
c0ny1/sqli-labs latest 183293ae4238 5 years ago 431MB
➜ safeline
标签:ago,none,chaitin,hours,images,docker,sha256,safeline,latest
From: https://www.cnblogs.com/amsilence/p/17414078.html