기술, 나의 공부를 공유합니다./Docker
5. Docker Stop
욘초
2023. 6. 22. 23:41
Run 중인 Container를 멈추는 명령어 이다.
Run 중인 Container 목록을 보고 싶으면
”$ docker ps” 명령어를 실행하면 된다.
1. Stop 명령어 Option (참조 : https://docs.docker.com/engine/reference/commandline/stop/ )
- Usage
$ docker stop [OPTIONS] CONTAINER [CONTAINER..]
- Option
- --signal, -s : signal to send to container
- --time, -t : seconds to wait before killing the container
2. 예제) 현재 실행 중인 apache image(httpd) 기반 Container “test_httpd”를 멈춰보자
1. 현재 실행 중인 Container 목록 확인 (명령어 : “$ docker ps”)
2. 멈출 Container 이름 확인 및 Stop 명령어 실행 (명령어 : “$ docker stop test_httpd”)
3. 실행 중인 Container 목록 확인