×ðÁú¿­Ê±

dockerÀ­È¡¾µÏñÔõôÉèÖÃ

docker À­È¡¾µÏñʱ¿É×Ô½ç˵ÉèÖà £¬°üÀ¨£ºÖ¸¶¨¾µÏñ°æ±¾¡¢¾µÏñ¿ÍÕ»¡¢ÏÞËÙÀ­È¡¡¢Éí·ÝÑéÖ¤ºÍÀ­È¡ÎÞ±êÇ©¾µÏñ¡£ÕâЩÉèÖÿÉͨ¹ý docker pull ÏÂÁî¼°ÆäÑ¡ÏîʵÏÖ £¬°üÀ¨ –registry¡¢–limit-rate¡¢–auth ºÍ -a¡£

ÔõÑùÉèÖà Docker À­È¡¾µÏñ

¼ò½é

Docker À­È¡¾µÏñÓÃÓÚ´Ó Docker ¾µÏñ¿ÍÕ»ÖлñÈ¡ËùÐè¾µÏñ¡£Äú¿ÉÒÔʹÓà docker pull ÏÂÁîÀ­È¡¾µÏñ £¬µ«ÓÐʱÐèÒª¾ÙÐÐÆäËûÉèÖÃÒÔ¿ØÖÆÀ­È¡ÐÐΪ¡£

ÉèÖÃ

ÒÔÏÂÊÇһЩ Docker À­È¡¾µÏñʱ¿ÉÓõÄÉèÖãº

1. Ö¸¶¨¾µÏñ°æ±¾

docker pull <image-name>:<tag></tag></image-name>

µÇ¼ºó¸´ÖÆ

ÆäÖÐ Ö¸¶¨¾µÏñµÄ°æ±¾»ò±êÇ©¡£ÀýÈç £¬ÒªÀ­È¡ Ubuntu ¾µÏñµÄ×îа汾 £¬ÇëʹÓãº

docker pull ubuntu:latest

µÇ¼ºó¸´ÖÆ

2. Ö¸¶¨¾µÏñ¿ÍÕ»

ĬÈÏÇéÐÎÏ £¬Docker »á´Ó Docker Hub£¨¹Ù·½¾µÏñ¿ÍÕ»£©À­È¡¾µÏñ¡£Òª´ÓÆäËû¾µÏñ¿ÍÕ»À­È¡¾µÏñ £¬ÇëʹÓà –registry Ñ¡Ï

docker pull --registry <registry-url><image-name></image-name></registry-url>

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬Òª´Ó Google ÈÝÆ÷¾µÏñ¿ÍÕ»À­È¡¾µÏñ £¬ÇëʹÓãº

docker pull --registry https://gcr.io google/debian:latest

µÇ¼ºó¸´ÖÆ

3. ÏÞËÙÀ­È¡

ʹÓà –limit-rate Ñ¡Ïî¿ÉÒÔÏÞÖÆÀ­È¡ËÙÂÊ£º

docker pull --limit-rate <bytes-per-second><image-name></image-name></bytes-per-second>

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬½«À­È¡ËÙÂÊÏÞÖÆΪÿÃë 1 MB£º

docker pull --limit-rate 1mb <image-name></image-name>

µÇ¼ºó¸´ÖÆ

4. Éí·ÝÑéÖ¤

ijЩ˽ÓоµÏñ¿ÍÕ»ÐèÒªÉí·ÝÑéÖ¤²Å»ª»á¼û¡£Äú¿ÉÒÔʹÓà –auth Ñ¡ÏîÌṩƾ֤£º

docker pull --auth <username>:<password><image-name></image-name></password></username>

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬ÒªÀ­È¡Ë½ÓоµÏñ £¬ÇëʹÓãº

docker pull --auth myusername:mypassword myregistry.io/myimage

µÇ¼ºó¸´ÖÆ

5. ÎÞ±êÇ©¾µÏñ

ÈôÊǾµÏñûÓбêÇ© £¬¿ÉÒÔʹÓà -a Ñ¡ÏîÀ­È¡Ëü£º

docker pull -a <image-name></image-name>

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬ÒªÀ­È¡ÃûΪ “myimage” µÄÎÞ±êÇ©¾µÏñ £¬ÇëʹÓãº

docker pull -a myimage

µÇ¼ºó¸´ÖÆ

ÆäËû×¢ÖØÊÂÏî

È·±£ÄúÓµÓÐÀ­È¡¾µÏñËùÐèµÄȨÏÞ¡£

Docker »á×Ô¶¯½«À­È¡µÄ¾µÏñ´æ´¢ÔÚÖ÷»úÉϵÄÍâµØ¾µÏñ¿ÍÕ»ÖС£

Äú¿ÉÒÔʹÓà docker images ÏÂÁîÉó²éÍâµØ´æ´¢µÄ¾µÏñ¡£

ÒÔÉϾÍÊÇdockerÀ­È¡¾µÏñÔõôÉèÖõÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿