尊龙凯时人生就是博

dockerÔõô²éÇéÐαäÁ¿

ÔõÑùÉó²é docker ÈÝÆ÷ÖеÄÇéÐαäÁ¿

Docker ÈÝÆ÷ÊÇÒ»ÖÖÇáÁ¿¼¶µÄÐéÄâÇéÐÎ £¬ÓÃÓÚ¸ôÀëºÍ´ò°üÓ¦ÓóÌÐò¼°ÒÀÀµÏî¡£ËüÌṩÁËһϵÁÐÇéÐαäÁ¿ £¬ÓÃÓÚÉèÖúͿØÖÆÈÝÆ÷µÄÔËÐÐʱÐÐΪ¡£

ÒªÉó²é Docker ÈÝÆ÷ÖеÄÇéÐαäÁ¿ £¬¿ÉÒÔʹÓÃÒÔÏ°취£º

1. »ñÈ¡ÈÝÆ÷ ID

docker ps -a

µÇ¼ºó¸´ÖÆ

´ËÏÂÁÁгöËùÓÐÕýÔÚÔËÐкÍÒÑ×èÖ¹µÄÈÝÆ÷¡£ÕÒµ½Òª¼ì²éµÄÇéÐαäÁ¿µÄÈÝÆ÷ ID¡£

2. Éó²éÇéÐαäÁ¿

¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÉó²éÈÝÆ÷µÄÇéÐαäÁ¿£º

docker inspect -f '{{json .Config.Env}}' <container-id></container-id>

µÇ¼ºó¸´ÖÆ

ÆäÖÐ ÊÇ°ì·¨ 1 ÖлñµÃµÄÈÝÆ÷ ID¡£

´ËÏÂÁÊä³öÒ»¸ö JSON ¹¤¾ß £¬ÆäÖаüÀ¨ÈÝÆ÷µÄÇéÐαäÁ¿Áбí¡£JSON ¹¤¾ßµÄÃûÌÃÈçÏ£º

[
  "KEY1=VALUE1",
  "KEY2=VALUE2",
  ...
]

µÇ¼ºó¸´ÖÆ

ÆäÖÐ KEY ÊÇÇéÐαäÁ¿µÄÃû³Æ £¬VALUE ÊÇÆäÖµ¡£

ʾÀý

ÀýÈç £¬ÒªÉó²éÃûΪ “my-container” µÄÈÝÆ÷ÖеÄÇéÐαäÁ¿ £¬¿ÉÒÔÔËÐÐÒÔÏÂÏÂÁ

docker inspect -f '{{json .Config.Env}}' my-container

µÇ¼ºó¸´ÖÆ

Õ⽫Êä³öÒ»¸öÀàËÆÓÚÒÔÏÂÄÚÈÝµÄ JSON ¹¤¾ß£º

[
  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  "USER=my-user",
  ...
]

µÇ¼ºó¸´ÖÆ

ÒÔÉϾÍÊÇdockerÔõô²éÇéÐαäÁ¿µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

13452372176

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

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

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