Ôõô¿´dockerÀú³Ì
docker Àú³ÌÉó²éÒªÁ죺1. docker cli ÏÂÁdocker ps£»2. systemd cli ÏÂÁsystemctl status docker£»3. docker compose cli ÏÂÁdocker-compose ps£»4. process explorer£¨windows£©£»5. /proc Ŀ¼£¨linux£©¡£
ÔõÑùÉó²é Docker Àú³Ì
Éó²é Docker Àú³ÌµÄÒªÁìÓжàÖÖ£º
1. Docker CLI
CLI ÏÂÁ docker ps
Êä³ö£º
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9b898fd ubuntu:16.04 "/bin/sh -c 'echo H'" 10 minutes ago Up 10 minutes 0.0.0.0:80->33333/tcp lab01
µÇ¼ºó¸´ÖÆ
2. Systemd
CLI ÏÂÁ systemctl status docker
Êä³ö£º
¡ñ docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2023-03-08 15:12:26 PST; 9s ago Main PID: 1076 (dockerd) CGroup: /system.slice/docker.service ©¸©¤1076 /usr/bin/dockerd Mar 08 15:12:26 hostname dockerd[1076]: time="2023-03-08T23:12:26.077651444Z" level=info msg="executing create container 9b898fd43c519e3d93678db6597befe79cd115b6e9c2d6b96ce165e8e084f1c5" container=9b898fd43c519e3d93678db6597befe79cd115b6e9c2d6b96ce165e8e084f1c5" image=ubuntu:16.04" Mar 08 15:12:26 hostname dockerd[1076]: time="2023-03-08T23:12:26.303290725Z" level=info msg="container 9b898fd43c519e3d93678db6597befe79cd115b6e9c2d6b96ce165e8e084f1c5" started" container=9b898fd43c519e3d93678db6597befe79cd115b6e9c2d6b96ce165e8e084f1c5" image=ubuntu:16.04"
µÇ¼ºó¸´ÖÆ
3. Docker Compose
CLI ÏÂÁ docker-compose ps
Êä³ö£º
Name Command State Ports ------------------------------------------------------------------------------ lab01_web_1 "/bin/sh -c 'echo ¡" Up 0.0.0.0:80->33333/tcp
µÇ¼ºó¸´ÖÆ
4. Process Explorer
ÔÚ Windows ÉÏ£º ʹÓà Sysinternals Process Explorer ¹¤¾ß£¬¿ÉÒÔÔÚÀú³ÌÁбíÖÐÉó²é Docker Àú³Ì¡£
ÔÚ Linux ÉÏ£º Éó²é /proc Ŀ¼ÖеÄÀú³Ì¡£
ÒÔÉϾÍÊÇÔõô¿´dockerÀú³ÌµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡
ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£