docker¾µÏñÔõôµ¼³ö
docker ¾µÏñµ¼³öÓÐÁ½ÖÖÒªÁ죺½«¾µÏñÉúÑÄÖÁ tar Îļþ»òÍÆË͵½×¢²á±í¡£µ¼³öµÄ¾µÏñ¿Éͨ¹ý¼ÓÔØÖÁÍâµØ docker ÊØ»¤Àú³Ì»ò´Ó×¢²á±íÖÐÀȡʹÓá£
Docker ¾µÏñµ¼³ö
ÔõÑùµ¼³ö Docker ¾µÏñ£¿
µ¼³ö Docker ¾µÏñ¿ÉÒÔ½«ÆäÉúÑĵ½ÍâµØ»òÔ¶³Ì×¢²á±íÖУ¬ÒÔ±ãÔÚÆäËû»úеÉÏʹÓá£ÓÐÁ½ÖÖ³£¼ûµÄÒªÁ죺
ÒªÁì 1£ºµ¼³öµ½ TAR Îļþ
docker save [IMAGE_NAME] > [EXPORT_FILE].tar
µÇ¼ºó¸´ÖÆ
ÀýÈ磺½«ÃûΪ “my-image” µÄ¾µÏñµ¼³öµ½ÃûΪ “my-image.tar” µÄ TAR ÎļþÖУº
docker save my-image > my-image.tar
µÇ¼ºó¸´ÖÆ
ÒªÁì 2£ºµ¼³öµ½×¢²á±í
docker push [IMAGE_NAME] [REGISTRY_URL]/[REPOSITORY_NAME]
µÇ¼ºó¸´ÖÆ
ÀýÈ磺½«ÃûΪ “my-image” µÄ¾µÏñÍÆË͵½ÃûΪ “my-registry” µÄ×¢²á±íÖÐµÄ “my-repository” ´æ´¢¿âÖУº
docker push my-image my-registry.io/my-repository
µÇ¼ºó¸´ÖÆ
µ¼³öºóµÄ¾µÏñÔõÑùʹÓã¿
µ¼³öµÄ¾µÏñ¿ÉÒÔͨ¹ýÒÔÏ·½·¨Ê¹Óãº
¼ÓÔص½ÍâµØ Docker ÊØ»¤Àú³Ì£º
docker load
µÇ¼ºó¸´ÖÆ
´Ó×¢²á±íÀÈ¡£º
docker pull [REGISTRY_URL]/[REPOSITORY_NAME]
µÇ¼ºó¸´ÖÆ
ÒÔÉϾÍÊÇdocker¾µÏñÔõôµ¼³öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡