docker windowsÔõôÓÃ
ÔÚ windows ϵͳÉÏʹÓà docker µÄ°ì·¨°üÀ¨£ºÆôÓà windows hyper-v¡£×°Öà docker desktop¡£ÑéÖ¤ docker ×°Öá£ÔËÐÐ docker ÈÝÆ÷¡£½øÈëÈÝÆ÷¡£×èÖ¹ºÍɾ³ýÈÝÆ÷¡£
ÔÚ Windows ÉÏʹÓà Docker
ÔÚ Windows ϵͳÉÏʹÓà Docker ÐèÒªÒÔÏ°취£º
1. ÆôÓÃ Windows Hyper-V
Ç°Íù¡°¿ØÖÆÃæ°å¡±>¡°³ÌÐòºÍ¹¦Ð§¡±>¡°ÆôÓûò½ûÓà Windows ¹¦Ð§¡±¡£
¹´Ñ¡¡°Hyper-V¡±²¢µã»÷¡°È·¶¨¡±¡£
2. ×°ÖÃ Docker Desktop
´Ó Docker ¹Ù·½ÍøÕ¾ÏÂÔØ Docker Desktop for Windows¡£
Ë«»÷×°ÖÃÎļþ²¢Æ¾Ö¤ÌáÐѾÙÐÐ×°Öá£
3. ÑéÖ¤ Docker ×°ÖÃ
ÔËÐÐÏÂÁîÐв¢ÊäÈëÒÔÏÂÏÂÁ
docker run hello-world
µÇ¼ºó¸´ÖÆ
ÈôÊÇÀֳɣ¬Äã»á¿´µ½¡°Hello from Docker!¡±µÄÊä³ö¡£
4. ÔËÐÐ Docker ÈÝÆ÷
ÕÒµ½ÒªÔËÐÐµÄ Docker ¾µÏñ£¨ÀýÈ磬Ubuntu£©¡£
ÔËÐÐÒÔÏÂÏÂÁ
docker run --name my-ubuntu ubuntu
µÇ¼ºó¸´ÖÆ
Õ⽫Æô¶¯²¢ÔËÐÐÒ»¸öÃûΪ¡°my-ubuntu¡±µÄ Ubuntu ÈÝÆ÷¡£
5. ½øÈëÈÝÆ÷
Òª½øÈëÈÝÆ÷£¬ÇëÔËÐÐÒÔÏÂÏÂÁ
docker exec -it my-ubuntu bash
µÇ¼ºó¸´ÖÆ
6. ×èÖ¹ºÍɾ³ýÈÝÆ÷
Òª×èÖ¹ÈÝÆ÷£¬ÇëÔËÐÐÒÔÏÂÏÂÁ
docker stop my-ubuntu
µÇ¼ºó¸´ÖÆ
Ҫɾ³ýÈÝÆ÷£¬ÇëÔËÐÐÒÔÏÂÏÂÁ
docker rm my-ubuntu
µÇ¼ºó¸´ÖÆ
ÌáÐÑ£º
ʹÓà docker ps ÏÂÁîÉó²éÕýÔÚÔËÐеÄÈÝÆ÷¡£
ʹÓà docker images ÏÂÁîÉó²éÒÑÏÂÔصľµÏñ¡£
ʹÓà docker pull ÏÂÁîÏÂÔؾµÏñ¡£
ʹÓà docker build ÏÂÁî¹¹½¨×Ô½ç˵¾µÏñ¡£
ÒÔÉϾÍÊÇdocker windowsÔõôÓõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡