×ðÁú¿­Ê±

ÔõÑùʹÓÃDocker¾ÙÐйÊÕÏÅŲéºÍÎÊÌⶨλ

Ëæ×ÅDockerµÄÆÕ¼°£¬Ô½À´Ô½¶àµÄ¿ª·¢ÕߺÍÔËάְԱ×îÏÈʹÓÃDockerÀ´ÖÎÀíËûÃǵÄÓ¦ÓóÌÐò¡£Docker²»µ«ÌṩÁËÒ»¸öÐéÄ⻯ÇéÐÎÀ´ÔËÐÐÕâЩӦÓóÌÐò£¬»¹Ê¹µÃ°²ÅźÍÖÎÀíÕâЩӦÓóÌÐò±äµÃÔ½·¢ÈÝÒס£È»¶ø£¬Ö»¹Ü Docker ȷʵ¿ÉÒÔʹ×ðÁú¿­Ê±ÉúÑıäµÃÔ½·¢ÇáËÉ£¬µ«ÔÚijЩÇéÐÎÏ£¬ËüÒ²¿ÉÄÜ»á´øÀ´Ò»Ð©ÎÊÌâ¡£µ±·ºÆðÎÊÌâʱ£¬ÎÒÃÇÐèҪʹÓà Docker À´¾ÙÐйÊÕÏÅŲéºÍÎÊÌⶨλ¡£±¾ÎĽ«ÏÈÈÝÔõÑùʹÓà Docker À´¾ÙÐйÊÕÏÅŲéºÍÎÊÌⶨ룬²¢ÌṩÏêϸ´úÂëʾÀý¡£

Ò»¡¢Ê¹Óà Docker logs À´Éó²éÈÕÖ¾

DockerÖеÄÈÝÆ÷ÊÇ¿ÉÒÔÊä³öÈÕÖ¾µÄ£¬²¢ÇÒÕâЩÈÕÖ¾ÊÇ¿ÉÒÔͨ¹ý Docker logs ÏÂÁîÀ´Éó²éµÄ¡£ Docker logs ÏÂÁî¿ÉÒÔÓÃÀ´»ñÈ¡ÈÝÆ÷µÄÈÕÖ¾ÐÅÏ¢£¬°üÀ¨ÈÝÆ÷µÄ±ê×¼Êä³öºÍ±ê×¼¹ýʧÊä³ö¡£

ÏÂÃæÊÇÒ»¸öÀý×Ó£º

docker logs my_container

µÇ¼ºó¸´ÖÆ

´ËÏÂÁ´òÓ¡ÃûΪ “my_container” µÄÈÝÆ÷µÄÈÕÖ¾Êä³ö¡£Í¨¹ýÉó²éÈÝÆ÷µÄÈÕÖ¾£¬ÎÒÃÇ¿ÉÒÔÏàʶµ½ÈÝÆ÷ÔÚÔËÐÐʱ±¬·¢ÁËʲô£¬²¢ÕÒ³öµ¼ÖÂÈÝÆ÷ÔËÐÐʧ°ÜµÄÔµ¹ÊÔ­ÓÉ¡£

¶þ¡¢Ê¹Óà Docker exec ÏÂÁîÀ´½øÈëÈÝÆ÷²¢¾ÙÐе÷ÊÔ

ÓÐʱ¼ä£¬Éó²éÈÕÖ¾²¢²»¿É½â¾öÎÊÌ⡣ΪÁ˸üºÃµØɨ³ý¹ÊÕÏ£¬ÎÒÃÇÐèÒªÔÚÈÝÆ÷ÄÚ²¿¾ÙÐе÷ÊÔ¡£Docker ÌṩÁËÒ»¸öÊÊÓóÌÐò£¬¼´ docker exec ÏÂÁÈÃÎÒÃÇ¿ÉÒÔÔÚÔËÐÐÖеÄÈÝÆ÷ÖÐÖ´ÐÐÏÂÁ²¢Éó²éÊä³öЧ¹û¡£

ÏÂÃæÊÇÒ»¸öÀý×Ó£º

docker exec -it my_container bash

µÇ¼ºó¸´ÖÆ

´ËÏÂÁ½øÈëÃûΪ “my_container” µÄÈÝÆ÷²¢Æô¶¯Ò»¸ö Bash Öնˡ£ÔÚÈÝÆ÷ÄÚ²¿£¬ÎÒÃÇ¿ÉÒÔÔËÐÐһЩÏÂÁîÀ´¼ì²éÈÝÆ÷µÄ״̬£¬²¢²éÕÒ¿ÉÄܵĹýʧԵ¹ÊÔ­ÓÉ¡£

Èý¡¢Ê¹Óà Docker ps ÏÂÁîÀ´Éó²éÔËÐÐÖеÄÈÝÆ÷

ÓÐʱ¼ä£¬ÎÒÃÇÐèÒªÉó²éÔËÐÐÖеÄÈÝÆ÷Áбí£¬ÒÔÈ·¶¨ÄÄЩÈÝÆ÷·ºÆðÁËÎÊÌâ¡£ Docker ÌṩÁËÒ»¸öÊÊÓóÌÐò£¬¼´ docker ps ÏÂÁÈÃÎÒÃÇ¿ÉÒÔÉó²éÕýÔÚÔËÐÐµÄ Docker ÈÝÆ÷Áбí¡£

ÏÂÃæÊÇÒ»¸öÀý×Ó£º

docker ps

µÇ¼ºó¸´ÖÆ

´ËÏÂÁÁгöËùÓÐÕýÔÚÔËÐÐµÄ Docker ÈÝÆ÷¡£ÎÒÃÇ¿ÉÒÔÉó²éÆä״̬ºÍ¿µ½¡×´Ì¬£¬²¢ÕÒ³öÊÇ·ñ±£´æÒì³£¡£

ËÄ¡¢Ê¹Óà Docker inspect ÏÂÁîÀ´Éó²éÈÝÆ÷ÏêϸÐÅÏ¢

Docker inspect ÏÂÁîÓÃÓÚ»ñÈ¡ÈÝÆ÷µÄÏêϸÐÅÏ¢£¬°üÀ¨ÈÝÆ÷µÄIPµØµã¡¢¶Ë¿ÚÓ³Éä¡¢ÇéÐαäÁ¿ºÍ¹ÒÔصãµÈ¡£

ÏÂÃæÊÇÒ»¸öÀý×Ó£º

docker inspect my_container

µÇ¼ºó¸´ÖÆ

´ËÏÂÁ·µ»ØÓйØÃûΪ “my_container” µÄÈÝÆ÷µÄÏêϸÐÅÏ¢¡£ÎÒÃÇ¿ÉÒÔʹÓÃÕâЩÏêϸÐÅÏ¢À´½øÒ»²½É¨³ýÈκοÉÄܵÄÎÊÌâ¡£

Î塢͎áÒÔÉϹ¤¾ß¾ÙÐÐ×ÛºÏÅŲé

ʹÓà Docker logs¡¢Docker exec¡¢Docker ps ºÍ Docker inspect ÏÂÁîµÄ×éºÏ£¬ÎÒÃÇ¿ÉÒÔ¾ÙÐÐ×ÛºÏÐԵĹÊÕÏÅŲéºÍÎÊÌⶨλ¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º

docker ps
docker logs my_container
docker inspect my_container
docker exec -it my_container bash

µÇ¼ºó¸´ÖÆ

ʹÓÃÒÔÉÏÏÂÁÎÒÃÇ¿ÉÒÔÕÒ³öÈÝÆ÷ÔËÐÐʧ°ÜµÄÔµ¹ÊÔ­ÓÉ£¬½øÒ»²½ÅŲé¹ÊÕÏ¡£

Áù¡¢×ܽá

Docker ÌṩÁËһЩºÜÊÇÓÐÓõÄÏÂÁîºÍ¹¤¾ß£¬ÓÃÓÚ¾ÙÐйÊÕÏÅŲéºÍÎÊÌⶨλ¡£±¾ÎÄÏÈÈÝÁËһЩÖ÷ÒªµÄ¹¤¾ßºÍÏÂÁ°üÀ¨ Docker logs¡¢Docker exec¡¢Docker ps ºÍ Docker inspect ¡£ÔÚÏÖʵӦÓÃÖУ¬ÎÒÃÇ¿ÉÒÔÍŽáʹÓÃÕâЩ¹¤¾ß£¬ÕÒ³öÈÝÆ÷ÔËÐÐʧ°ÜµÄÔµ¹ÊÔ­ÓÉ£¬²¢¾ÙÐÐÏìÓ¦µÄÐÞ¸´¡£

ÒÔÉϾÍÊÇÔõÑùʹÓÃDocker¾ÙÐйÊÕÏÅŲéºÍÎÊÌⶨλµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

13452372176

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

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

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