Skip to Content
Suffering builds character

3.컨테이너 실행

생성한 도커 컨테이너를 실행하기 위해서는 docker start 컨테이너ID or 컨테이너이름 명령어를 사용

컨테이너 실행

terminal
docker start 컨테이너ID or 컨테이너명

1. 컨테이너 ID를 활용하여 해당 컨테이너 실행

CONTAINER ID or NAMES를 사용하여 해당 container 실행(가동)

terminal
docker start -a 5e91b1f4143c # 컨테이너 ID로 컨테이너 실행 # or docker start -a sad_maxwell # 컨테이너 이름으로 컨테이너 실행

실행 결과

terminal
Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

2. 현재 실행 중인 컨테이너 조회

docker ps -a 명령어를 통해 생성한 모든(-all) 컨테이너, 모든 프로세스를 조회할 수 있음

terminal
docker ps -a
Last updated on