1. 개요

컨테이너 내부로 이동


2. 방법

2-1. 컨테이너 ID 확인

]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
f537532e716c        tomcat:8            "catalina.sh run"   11 minutes ago      Up 11 minutes       0.0.0.0:8080->8080/tcp   reverent_darwin

f537532e716c이다.

2-2. 실행

# docker exec -it f537532e716c /bin/bash
root@f537532e716c:/usr/local/tomcat#

2-3. 확인

root@f537532e716c:/usr/local/tomcat# ls -l
total 120
-rw-r----- 1 root root  57092 Apr 27 20:26 LICENSE
-rw-r----- 1 root root   1723 Apr 27 20:26 NOTICE
-rw-r----- 1 root root   7138 Apr 27 20:26 RELEASE-NOTES
-rw-r----- 1 root root  16246 Apr 27 20:26 RUNNING.txt
drwxr-x--- 2 root root   4096 Jun 27 07:13 bin
drwx--S--- 1 root root   4096 Jun 28 00:37 conf
drwxr-sr-x 3 root staff  4096 Jun 27 07:12 include
drwxr-x--- 2 root root   4096 Jun 27 07:12 lib
drwxr-x--- 1 root root   4096 Jun 28 00:37 logs
drwxr-sr-x 3 root staff  4096 Jun 27 07:12 native-jni-lib
drwxr-x--- 2 root root   4096 Jun 27 07:12 temp
drwxr-x--- 1 root root   4096 Apr 27 20:24 webapps
drwxr-x--- 1 root root   4096 Jun 28 00:37 work