docker logs에 내용 출력하기

1 개요[ | ]

docker logs에 내용 출력하기
docker logs에 로그내용 출력하기
SSH세션 #1
root@centos7:~# docker run -d --name nginx1 nginx
327a684301484c4547885bea8dcf4a42f5a7659aab45303ce5842313c97ca923
root@centos7:~# docker ps -a | grep nginx1
327a68430148        nginx               "nginx -g 'daemon of…"   3 minutes ago       Up 3 minutes        80/tcp              nginx1
root@centos7:~# docker logs -f nginx1
SSH세션 #2
root@centos7:~# docker exec -it nginx1 bash
root@327a68430148:/# echo hello > /proc/1/fd/1
root@327a68430148:/# echo world > /proc/1/fd/1
root@327a68430148:/#
SSH세션 #1
root@centos7:~# docker logs -f nginx1
hello
world

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}