Development/Docker
[Docker] 실행중인 Container 에 진입하는 법
성딱이
2021. 9. 17. 11:26
반응형
1. 실행중인 프로세스를 확인한다.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
422d7ec69cfb sjhsjh/tensorflow2:v1.1 "/bin/bash" 4 days ago Up 4 days
0.0.0.0:6006->6006/tcp, 0.0.0.0:8989->8989/tcp charming_archimedes
2. 도커 컨테이너 진입
$ docker exec -it 422d7ec69cfb /bin/bash
________ _______________
___ __/__________________________________ ____/__ /________ __
__ / _ _ \_ __ \_ ___/ __ \_ ___/_ /_ __ /_ __ \_ | /| / /
_ / / __/ / / /(__ )/ /_/ / / _ __/ _ / / /_/ /_ |/ |/ /
/_/ \___//_/ /_//____/ \____//_/ /_/ /_/ \____/____/|__/
WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.
To avoid this, run the container by specifying your user's userid:
$ docker run -u $(id -u):$(id -g) args...
3. Docker Container 실행 중인 상태로 빠져나오기
ctrl + p / ctrl + q 를 순서대로 입력
root@1111111fa8a1:/bin/bash# read escape sequence
끄읏
참조 : https://firework-ham.tistory.com/64
[Docker] 도커 컨테이너 커맨드 진입하는 방법.
도커 컨테이너 실행 후 커맨드로 진입하는 방법을 매번 까먹는 것 같아 정리합니다. 1. 현재 동작 중인 docker 이미지 확인하기 현재 동작 중인 docker 컨테이너는 아래 명령어로 가능합니다. docker ps
firework-ham.tistory.com
반응형