尊龙凯时人生就是博

dockerÔõô½øÈëÈÝÆ÷Ŀ¼

½øÈë docker ÈÝÆ÷Ŀ¼µÄÒªÁ죺ʹÓà docker exec ÏÂÁîʹÓà docker attach ÏÂÁîʹÓà docker run ÏÂÁîʹÓà docker cp ÏÂÁî

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

µ±ÄãÐèÒª»á¼û Docker ÈÝÆ÷ÄÚµÄĿ¼ʱ£¬¿ÉÒÔʹÓÃÒÔÏÂÒªÁ죺

1. ʹÓà Docker exec ÏÂÁî

ÕâÊǽøÈëÈÝÆ÷µÄ×î³£¼ûÒªÁ죺

docker exec -it  /bin/bash

µÇ¼ºó¸´ÖÆ

ÀýÈ磬Ҫ½øÈëÃûΪ “my-container” µÄÈÝÆ÷£¬ÇëÔËÐУº

docker exec -it my-container /bin/bash

µÇ¼ºó¸´ÖÆ

2. ʹÓà Docker attach ÏÂÁî

Õâ»á½«Ä㸽¼Óµ½ÈÝÆ÷µÄ±ê×¼ÊäÈë¡¢Êä³öºÍ¹ýʧÁ÷£º

docker attach 

µÇ¼ºó¸´ÖÆ

ÀýÈ磬Ҫ¸½¼Óµ½ “my-container” ÈÝÆ÷£¬ÇëÔËÐУº

docker attach my-container

µÇ¼ºó¸´ÖÆ

3. ʹÓà Docker run ÏÂÁî

Õ⽫ÔËÐÐÒ»¸öеÄÈÝÆ÷£¬²¢ÔÊÐíÄãÖ¸¶¨Òª¹ÒÔصÄÖ÷»úĿ¼£º

docker run --rm -ti -v :/container/directory  /bin/bash

µÇ¼ºó¸´ÖÆ

ÀýÈ磬Ҫ½«ÍâµØĿ¼ “/my/local/directory” ¹ÒÔص½ÈÝÆ÷ÄÚµÄ “/container/directory”£¬ÇëÔËÐУº

docker run --rm -ti -v /my/local/directory:/container/directory my-image /bin/bash

µÇ¼ºó¸´ÖÆ

4. ʹÓà Docker cp ÏÂÁî

ÕâÔÊÐíÄ㽫Îļþ»òĿ¼´ÓÈÝÆ÷¸´ÖƵ½Ö÷»ú»ò´ÓÖ÷»ú¸´ÖƵ½ÈÝÆ÷£º

docker cp : 

µÇ¼ºó¸´ÖÆ

ÀýÈ磬Ҫ½«ÈÝÆ÷ÖÐµÄ “/container/file.txt” Îļþ¸´ÖƵ½Ö÷»úÉ쵀 “/my/local/file.txt”£¬ÇëÔËÐУº

docker cp my-container:/container/file.txt /my/local/file.txt

µÇ¼ºó¸´ÖÆ

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

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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