×ðÁú¿­Ê±

dockerÔõÑù½øÈëÈÝÆ÷

½øÈë docker ÈÝÆ÷ÐèÒªÖ´ÐÐÒÔÏ°취£º·­¿ªÖն˴°¿Ú¡£Ê¹Óà docker ps ÏÂÁîÉó²éÕýÔÚÔËÐеÄÈÝÆ÷¡£Ê¹Óà docker exec -it /bin/bash ÏÂÁî½øÈëÈÝÆ÷¡£ÔÚÈÝÆ÷ÄÚÖ´ÐÐÏÂÁʹÓà exit ÏÂÁîÍ˳öÈÝÆ÷¡£

ÔõÑù½øÈë Docker ÈÝÆ÷

½øÈë Docker ÈÝÆ÷µÄ°ì·¨ºÜ¼òÆÓ £¬Ö»ÐèÒ»ÌõÏÂÁî¼´¿ÉÍê³É£º

docker exec -it  /bin/bash

µÇ¼ºó¸´ÖÆ

Ïêϸ°ì·¨£º

·­¿ªÖն˴°¿Ú£ºÔÚ Mac »ò Linux ϵͳÉÏ £¬·­¿ªÖն˴°¿Ú¡£ÔÚ Windows ϵͳÉÏ £¬·­¿ª Windows PowerShell »òÏÂÁîÌáÐÑ·û¡£

ʶ±ðÈÝÆ÷Ãû³Æ£ºÊ¹ÓÃÒÔÏÂÏÂÁîÉó²éÕýÔÚÔËÐеÄÈÝÆ÷ÁÐ±í£º

docker ps

µÇ¼ºó¸´ÖÆ

Õ⽫Êä³öÈÝÆ÷Ãû³Æ¡¢¾µÏñÃû³Æ¡¢Æô¶¯Ê±¼äµÈÐÅÏ¢¡£

Ö´ÐÐ exec ÏÂÁʹÓà docker exec ÏÂÁî½øÈëÈÝÆ÷¡£ÀýÈç £¬Òª½øÈëÃûΪ “my-container” µÄÈÝÆ÷ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

docker exec -it my-container /bin/bash

µÇ¼ºó¸´ÖÆ

-i Ñ¡ÏîÌåÏÖÔÚÈÝÆ÷Öз­¿ªÒ»¸ö½»»¥Ê½»á»°¡£

-t Ñ¡ÏîÌåÏÖΪ»á»°·ÖÅÉÒ»¸öαtty¡£

/bin/bash ÏÂÁ/bin/bash ÏÂÁîÔÚÈÝÆ÷ÖÐÆô¶¯Ò»¸ö bash »á»°¡£

ÌáÐÑ·û£ºÀֳɽøÈëÈÝÆ÷ºó £¬Äú½«ÔÚÏÂÁîÌáÐÑ·ûÖп´µ½ root@¡£ÕâÌåÏÖÄúÏÖÔÚÒÑ×÷Ϊ root Óû§µÇ¼µ½ÈÝÆ÷ÖС£

Ö´ÐÐÏÂÁÄúÏÖÔÚ¿ÉÒÔÔÚÈÝÆ÷ÄÚÖ´ÐÐÏÂÁî £¬¾ÍÏñÔÚͨË× Linux ϵͳÖÐÒ»Ñù¡£

Í˳öÈÝÆ÷£ºÒªÍ˳öÈÝÆ÷ £¬Ö»Ðè¼üÈë exit ÏÂÁî¼´¿É¡£

ÒÔÉϾÍÊÇdockerÔõÑù½øÈëÈÝÆ÷µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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