×ðÁú¿­Ê±

dockerÈÝÆ÷commandÔõô¸Ä

¸ü¸Ä docker ÈÝÆ÷ÖеÄÏÂÁîÓÐÁ½ÖÖÒªÁ죺ʹÓà dockerfile £¬ÔÚ½¨ÉèÈÝÆ÷ʱָ¶¨ÃüÁʹÓà docker update ÏÂÁî £¬ÔÚÈÝÆ÷½¨Éèºó¸ü¸ÄÏÂÁî¡£¸ü¸ÄÏÂÁîºó £¬ÐèÒªÖØÐÂÆô¶¯ÈÝÆ÷²Å»ªÊ¹ÐÂÏÂÁîÉúЧ¡£

ÔõÑù¸ü¸Ä Docker ÈÝÆ÷ÖеÄÏÂÁî

¸ü¸Ä Docker ÈÝÆ÷ÖеÄÏÂÁîºÜÊǼòÆÓ £¬Ö÷ÒªÓÐÁ½ÖÖÒªÁ죺

1. ʹÓà Dockerfile

ÔÚ½¨ÉèÈÝÆ÷ʱ £¬¿ÉÒÔʹÓà Dockerfile Ö¸¶¨ÒªÔËÐеÄÏÂÁî¡£Dockerfile ÊÇÒ»·ÝÎı¾Îļþ £¬ÆäÖаüÀ¨ÓÃÓÚ¹¹½¨¾µÏñµÄÖ¸Áî¡£Òª¸ü¸ÄÏÂÁî £¬ÇëÔÚ Dockerfile ÖÐÓà CMD Ö¸ÁîÖ¸¶¨ÐµÄÏÂÁî¡£ÀýÈ磺

FROM ubuntu:latest
CMD ["/bin/bash"]

µÇ¼ºó¸´ÖÆ

2. ʹÓà docker update ÏÂÁî

ÈôÊÇÈÝÆ÷ÒѾ­½¨Éè £¬¿ÉÒÔʹÓà docker update ÏÂÁîÀ´¸ü¸ÄÏÂÁî¡£¸ÃÏÂÁî½ÓÊÜÒ»¸öÈÝÆ÷ ID »òÃû³Æ £¬ÒÔ¼°Ò»¸öеÄÏÂÁî×÷Ϊ²ÎÊý¡£ÀýÈ磺

docker update --name my-container --cmd "/bin/bash"

µÇ¼ºó¸´ÖÆ

¸ü¸ÄÏÂÁîºó×öʲô£¿

¸ü¸ÄÏÂÁîºó £¬ÐèҪעÖØÒÔÏÂÊÂÏ

ÈÝÆ÷±ØÐèÖØÐÂÆô¶¯£ºÎªÁËʹеÄÏÂÁîÉúЧ £¬±ØÐèÖØÐÂÆô¶¯ÈÝÆ÷¡£¿ÉÒÔʹÓà docker restart ÏÂÁî¾ÙÐÐÖØÆô¡£

¸ü¸ÄºóµÄÏÂÁÁýÕÖ֮ǰµÄÏÂÁCMD Ö¸ÁÁýÕÖÏÈÇ°Ö¸¶¨µÄÈκÎÏÂÁî¡£

Docker Compose£ºÈôÊÇÄúʹÓà Docker Compose ÖÎÀíÄúµÄÈÝÆ÷ £¬ÔòÐèÒª¸üРdocker-compose.yml ÎļþÒÔÖ¸¶¨ÐµÄÏÂÁî¡£

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

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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