×ðÁú¿­Ê±¹ÙÍøµÇ¼

dockerÔõôÉèÖþµÏñ¿ÍÕ»

ÉèÖà docker ¾µÏñ¿ÍÕ»µÄÁù¸öÒªº¦°ì·¨£ºÑ¡Ôñ¾µÏñ¿ÍÕ»½¨Éè¿ÍÕ»ÈÏÖ¤µ½¾µÏñ¿ÍÕ»ÍÆË;µÏñµ½¿ÍÕ»´Ó¿ÍÕ»À­È¡¾µÏñÉèÖþµÏñ¿Íջƾ֤£¨¿ÉÑ¡£©

ÔõÑùÉèÖà Docker ¾µÏñ¿ÍÕ»

Docker ¾µÏñ¿ÍÕ»ÊÇ´æ´¢ºÍÖÎÀí Docker ¾µÏñµÄÖÐÑëλÖá£ÒªÉèÖà Docker ¾µÏñ¿ÍÕ»£¬¿ÉÒÔƾ֤ÒÔÏ°취¾ÙÐУº

1. Ñ¡Ôñ¾µÏñ¿ÍÕ»

Docker Hub£º¹«ÓоµÏñ¿ÍÕ»£¬Ä¬ÈÏÇéÐÎÏ´洢ÔÚ docker.io ÉÏ¡£

˽ÓоµÏñ¿ÍÕ»£ºÍйÜÔÚ×Ô¼ºµÄ»ù´¡ÉèÊ©»òµÚÈý·½Ð§ÀÍÌṩÉÌ´¦¡£

2. ½¨Éè¿ÍÕ»

Docker Hub£ºÖ±½ÓÔÚ Docker Hub ÍøÕ¾ÉϽ¨ÉèÕÊ»§²¢½¨Éè¿ÍÕ»¡£

˽ÓоµÏñ¿ÍÕ»£ºÊ¹Óà Docker Registry API »òµÚÈý·½¹¤¾ß£¨Èç Portainer »ò Harbor£©½¨Éè¿ÍÕ»¡£

3. ÈÏÖ¤µ½¾µÏñ¿ÍÕ»

Docker Hub£ºÊ¹Óà docker login ÏÂÁîµÇ¼µ½ Docker Hub¡£

˽ÓоµÏñ¿ÍÕ»£ºÆ¾Ö¤Ê¹ÓõľµÏñ¿ÍÕ»£¬Ê¹ÓÃÊʵ±µÄÈÏÖ¤ÒªÁ죨Èç OAuth2¡¢Óû§Ãû/ÃÜÂë»òÖ¤Ê飩¡£

4. ÍÆË;µÏñµ½¿ÍÕ»

ʹÓà docker push ÏÂÁÍâµØ¾µÏñÍÆË͵½¿ÍÕ»¡£Ó﷨Ϊ£º

docker push <registry>/<repo>/<image>[:<tag>]</tag></image></repo></registry>

µÇ¼ºó¸´ÖÆ

ÀýÈ磺

docker push docker.io/my-repo/my-image:latest

µÇ¼ºó¸´ÖÆ

5. ´Ó¿ÍÕ»À­È¡¾µÏñ

ʹÓà docker pull ÏÂÁî´Ó¿ÍÕ»À­È¡¾µÏñ¡£Ó﷨Ϊ£º

docker pull <registry>/<repo>/<image>[:<tag>]</tag></image></repo></registry>

µÇ¼ºó¸´ÖÆ

ÀýÈ磺

docker pull docker.io/library/nginx:latest

µÇ¼ºó¸´ÖÆ

6. ÉèÖþµÏñ¿Íջƾ֤£¨¿ÉÑ¡£©

ΪÁË×èֹÿ´ÎÍÆËÍ»òÀ­È¡¾µÏñʱ¶¼ÐèÒªÈÏÖ¤£¬¿ÉÒÔÉèÖþµÏñ¿Íջƾ֤¡£

ÔÚ Docker ¿Í»§¶ËÉèÖã¨~/.docker/config.json£©ÖÐÌí¼Óƾ֤£º

{
"auths": {
  "<registry>": {
    "auth": "<base64 encoded username:password>"
  }
}
}</base64></registry>

µÇ¼ºó¸´ÖÆ

ͨ¹ýÍê³ÉÕâЩ°ì·¨£¬¼´¿ÉÀÖ³ÉÉèÖà Docker ¾µÏñ¿ÍÕ»¡£Õ⽫ʹÄãÄܹ»´æ´¢¡¢ÖÎÀíºÍ¹²Ïí Docker ¾µÏñ£¬´Ó¶ø¼ò»¯ÈÝÆ÷»¯Ó¦ÓóÌÐòµÄ°²ÅÅ¡£

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

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ