dockerÔõôɾ³ý¾µÏñÎļþ
Ҫɾ³ý docker ¾µÏñÎļþ£¬¿ÉÒÔʹÓà docker image rm ÏÂÁҪɾ³ýµ¥¸ö¾µÏñ£¬Ê¹ÓÃÆäÍêÕû»ò²¿·ÖÃû³Æ£¨Èç docker image rm my-image£©¡£ÒªÉ¾³ý¶à¸ö¾µÏñ£¬Ê¹ÓÃͨÅä·û»ò¿Õ¸ñÍÑÀëµÄ¾µÏñÃû³ÆÁÐ±í£¨Èç docker image rm my-*£©¡£ÒªÉ¾³ýËùÓÐδʹÓõľµÏñ£¬Ê¹Óà docker image prune ÏÂÁî¡£
ÔõÑùÔÚ Docker ÖÐɾ³ý¾µÏñÎļþ
Ҫɾ³ý Docker ¾µÏñÎļþ£¬¿ÉÒÔʹÓà docker image rm ÏÂÁî¡£¸ÃÏÂÁîµÄÓ﷨Ϊ£º
docker image rm [IMAGE_NAME]
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬IMAGE_NAME ÊÇҪɾ³ýµÄ¾µÏñÃû³Æ¡£
ÐèҪעÖصÄÊÇ£¬docker image rm ÏÂÁîÖ»»áɾ³ýÍâµØ¾µÏñ£¬²¢²»»áɾ³ýÔ¶³Ì¿ÍÕ»ÖеľµÏñ¡£ÈôÊÇÄúÏ£Íû´ÓÔ¶³Ì¿ÍÕ»ÖÐɾ³ý¾µÏñ£¬ÔòÐèҪʹÓà docker image prune ÏÂÁî¡£
ɾ³ýµ¥¸ö¾µÏñ
Ҫɾ³ýµ¥¸ö¾µÏñ£¬¿ÉÒÔʹÓÃÆäÍêÕûµÄ¾µÏñÃû³Æ»òÆ䲿·ÖÃû³Æ¡£ÀýÈ磬Ҫɾ³ýÃûΪ my-image µÄ¾µÏñ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
docker image rm my-image
µÇ¼ºó¸´ÖÆ
»òÕߣ¬¿ÉÒÔʹÓÃÆ䲿·ÖÃû³Æ£¬ÈçÏÂËùʾ£º
docker image rm my-i
µÇ¼ºó¸´ÖÆ
ɾ³ý¶à¸ö¾µÏñ
Ҫɾ³ý¶à¸ö¾µÏñ£¬¿ÉÒÔʹÓÃͨÅä·û»òÒ»¸ö¿Õ¸ñÍÑÀëµÄ¾µÏñÃû³ÆÁÐ±í¡£ÀýÈ磬Ҫɾ³ýÒÔ my- ¿ªÍ·µÄËùÓоµÏñ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
docker image rm my-*
µÇ¼ºó¸´ÖÆ
Ҫɾ³ýÃûΪ my-image ºÍ my-other-image µÄÁ½¸ö¾µÏñ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
docker image rm my-image my-other-image
µÇ¼ºó¸´ÖÆ
ɾ³ýδʹÓõľµÏñ
Ҫɾ³ýËùÓÐδʹÓõľµÏñ£¬¿ÉÒÔʹÓà docker image prune ÏÂÁî¡£¸ÃÏÂÁɾ³ýËùÓÐûÓб»ÈκÎÈÝÆ÷ʹÓõľµÏñ¡£
docker image prune
µÇ¼ºó¸´ÖÆ
ÒÔÉϾÍÊÇdockerÔõôɾ³ý¾µÏñÎļþµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡