dockerÔõôǨáã
ҪǨáã docker ÈÝÆ÷£¬ÇëÖ´ÐÐÒÔÏ°취£ºÉúÑÄÈÝÆ÷¾µÏñ£ºÊ¹Óà docker commit ÏÂÁî¡£ÌìÉúÈÝÆ÷Çåµ¥£ºÊ¹Óà docker inspect ÏÂÁî¡£ÔÚÄ¿µÄ»úеÉϼÓÔؾµÏñ£ºÊ¹Óà docker load ÏÂÁî¡£½¨ÉèÐÂÈÝÆ÷£ºÊ¹Óà docker create ÏÂÁî¡£Æô¶¯ÐÂÈÝÆ÷£ºÊ¹Óà docker start ÏÂÁî¡£
ÔõÑùǨáã Docker ÈÝÆ÷
Docker ÊÇÒ»ÖÖÊ¢ÐеÄÈÝÆ÷»¯ÊÖÒÕ£¬ÔÊÐíÄú½«Ó¦ÓóÌÐòÓëËùÓÐÒÀÀµÏî´ò°üµ½Ò»¸ö×ÔÁ¦µÄµ¥Î»ÖС£ÕâʹµÃÔÚ²î±ðµÄÇéÐÎÖа²ÅźÍÖÎÀíÓ¦ÓóÌÐò±äµÃÔ½·¢ÇáËÉ¡£È»¶ø£¬ÓÐʱÐèÒª½«ÈÝÆ÷´Óһ̨»úеǨáãµ½Áíһ̨»úе¡£
°ì·¨
ҪǨáã Docker ÈÝÆ÷£¬Äú¿ÉÒÔʹÓÃÒÔÏ°취£º
ÉúÑÄÈÝÆ÷¾µÏñ£º
ÔËÐÐ docker commit ÏÂÁΪҪǨáãµÄÈÝÆ÷½¨ÉèÒ»¸öоµÏñ¡£
Ö¸¶¨Ð¾µÏñµÄÃû³Æ¡£
ÌìÉúÈÝÆ÷Çåµ¥£º
ÔËÐÐ docker inspect ÏÂÁî»ñȡҪǨáãµÄÈÝÆ÷µÄÇåµ¥¡£
½«Çåµ¥ÉúÑĵ½ÎļþÖС£
ÔÚÄ¿µÄ»úеÉϼÓÔؾµÏñ£º
ÔÚÄ¿µÄ»úеÉÏ£¬Ê¹Óà docker load ÏÂÁî¼ÓÔصÚÒ»²½½¨ÉèµÄ¾µÏñ¡£
½¨ÉèÐÂÈÝÆ÷£º
ʹÓõڶþ²½ÌìÉúµÄÇåµ¥£¬ÔÚÄ¿µÄ»úеÉÏʹÓà docker create ÏÂÁÉèÐÂÈÝÆ÷¡£
È·±£Ö¸¶¨ÏàͬµÄÈÝÆ÷Ãû³ÆºÍÍøÂçÉèÖá£
Æô¶¯ÐÂÈÝÆ÷£º
ʹÓà docker start ÏÂÁîÆô¶¯Ð½¨ÉèµÄÈÝÆ÷¡£
×¢ÖØÊÂÏî
ÈôÊÇÈÝÆ÷ʹÓÃÁË¾í£¬ÄúÐèÒªÊÖ¶¯ÖØн¨ÉèËüÃÇ¡£
ÈôÊÇÈÝÆ÷ÓйÒÔصĶ˿ڣ¬ÄúÐèÒªÔÚÄ¿µÄ»úеÉÏÖØÐÂÉèÖö˿ÚÓ³Éä¡£
ÈôÊÇÈÝÆ÷ÓÉ Docker ±àÅÅЧÀÍÖÎÀí£¬ÄúÐèÒª¸üбàÅÅÉèÖÃÒÔ°üÀ¨Ä¿µÄ»úе¡£
ʾÀý
ÒÔÏÂÊÇÒ»¸öǨáãÃûΪ “my-app” µÄÈÝÆ÷µÄʾÀý£º
# ÉúÑľµÏñ docker commit my-app my-app-new-image # ÌìÉúÇåµ¥ docker inspect my-app > my-app-manifest.json # ÔÚÄ¿µÄ»úеÉϼÓÔؾµÏñ docker load
µÇ¼ºó¸´ÖÆ
ÒÔÉϾÍÊÇdockerÔõôǨáãµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡