dockerÔõôɾ³ýnone tag
¿ÉÒÔͨ¹ýÊÖ¶¯É¾³ýδ±ê¼ÇµÄ¾µÏñ»òʹÓÃdocker cli²å¼þÅúÁ¿É¾³ýnone tag¡£ÊÖ¶¯É¾³ý°üÀ¨ÕÒ³öδ±ê¼ÇµÄ¾µÏñ£¬»ñÈ¡¾µÏñid£¬È»ºóɾ³ý¾µÏñ¡£ÅúÁ¿É¾³ýÔò¿ÉÒÔʹÓÃÏÂÁîdocker images -f dangling=true -q | xargs docker rmiɾ³ýËùÓÐδ±ê¼ÇµÄ¾µÏñ¡£
ÔõÑùɾ³ý Docker ÖÐµÄ None Tag
None Tag ÊÇÒ»¸öÌØÊâ±êÇ©£¬ÓÃÓÚ±ê¼Çδ±ê¼ÇµÄ¾µÏñ£¬Ëü»áÕ¼ÓôÅÅ̿ռ䲢×ÌÈžµÏñÖÎÀí¡£ÒÔÏÂÒªÁì¿ÉÒÔɾ³ý Docker ÖÐµÄ None Tag£º
ÊÖ¶¯É¾³ý
ÕÒ³öδ±ê¼ÇµÄ¾µÏñ£ºdocker images | grep none
»ñÈ¡¾µÏñ ID£ºdocker inspect IMAGE_ID | jq -r ‘.Id’
ɾ³ý¾µÏñ£ºdocker rmi IMAGE_ID
ÅúÁ¿É¾³ý
ʹÓÃÒÔÏÂÏÂÁîÅúÁ¿É¾³ýËùÓÐδ±ê¼ÇµÄ¾µÏñ£º
docker images -f dangling=true -q | xargs docker rmi
µÇ¼ºó¸´ÖÆ
ʹÓà Docker CLI ²å¼þ
»¹¿ÉÒÔʹÓà Docker CLI ²å¼þ£¨ÀýÈç docker-cleanup) ×Ô¶¯É¾³ý None Tag¡£×°Öò¢ÆôÓòå¼þºó£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîɾ³ý None Tag£º
docker-cleanup -f
µÇ¼ºó¸´ÖÆ
×¢ÖØÊÂÏ
È·±£É¾³ýµÄ¾µÏñ²»ÊDZ»ÆäËûÈÝÆ÷»ò¾µÏñʹÓõģ¬²»È»¿ÉÄܻᵼÖÂÎÊÌâ¡£
ÈôÊÇɾ³ýµÄ¾µÏñ°üÀ¨Ö÷ÒªÊý¾Ý£¬ÇëÔÚɾ³ýÇ°±¸·ÝÊý¾Ý¡£
ÒÔÉϾÍÊÇdockerÔõôɾ³ýnone tagµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡