docker 데몬 디버깅

이상민·2023년 4월 18일
0

docker

목록 보기
10/19

event

$ docker system events

2023-04-18T05:57:58.834877074Z container create 1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=naughty_wilson)
2023-04-18T05:57:58.837114273Z container attach 1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=naughty_wilson)
2023-04-18T05:57:58.889803114Z network connect 33defb7512fc7b4dd54b9fdb200e28a19a8e345ab7bac26bd0705dc3371a6b37 (container=1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad, name=bridge, type=bridge)
2023-04-18T05:57:59.284536392Z container start 1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=naughty_wilson)
2023-04-18T05:57:59.390039784Z network disconnect 33defb7512fc7b4dd54b9fdb200e28a19a8e345ab7bac26bd0705dc3371a6b37 (container=1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad, name=bridge, type=bridge)
2023-04-18T05:57:59.415144683Z container die 1228d5f3e34adbca669c187de17e8a380abc29960826798dfe3988bb4a2036ad (exitCode=127, image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=naughty_wilson)
2023-04-18T05:58:26.686823852Z container create 3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e (image=nginx:latest, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=my-nginx)
2023-04-18T05:58:26.688608286Z container attach 3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e (image=nginx:latest, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=my-nginx)
2023-04-18T05:58:26.742984834Z network connect 33defb7512fc7b4dd54b9fdb200e28a19a8e345ab7bac26bd0705dc3371a6b37 (container=3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e, name=bridge, type=bridge)
2023-04-18T05:58:27.217254973Z container start 3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e (image=nginx:latest, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=my-nginx)
2023-04-18T05:59:26.417217789Z container kill 3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e (image=nginx:latest, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=my-nginx, signal=2)
2023-04-18T05:59:26.564335211Z network disconnect 33defb7512fc7b4dd54b9fdb200e28a19a8e345ab7bac26bd0705dc3371a6b37 (container=3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e, name=bridge, type=bridge)
2023-04-18T05:59:26.607987563Z container die 3b63c98ab27200cd08fe7dc510ade309adc7c171fdc8537d025519e5acc3fd8e (exitCode=0, image=nginx:latest, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=my-nginx)

$ docker run nginx --name my-nginx nginx:latest
을 다른 bash에서 실행했을 때 container의 과정을 보여줌

$ journalctl -u docker

docker log 확인

용량 확인

$ docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          8         3         1.85GB    791.6MB (42%)
Containers      4         0         1.133kB   1.133kB (100%)
Local Volumes   2         0         1.588GB   1.588GB (100%)
Build Cache     46        0         4.61MB    4.61MB
$ docker system df -v

$ docker system df 보다 더 자세하게 볼 수 있음.

용량 제어

$ docker system prune

미사용인 container와 이미지 삭제

사용 확인

$ docker stats

해당 container의 CPU, IO등을 확인할 수 있음.

0개의 댓글