상세 컨텐츠

본문 제목

[Docker] Entrypoint와 Command

Code

by 민재아빠 2022. 4. 21. 00:33

본문

Entrypoint

컨테이너 실행 시 실행되는 명령어

 

Command

Entrypoint의 Argument, Entrypoint를 명시하지않을 경우 컨테이너 실행 시 실행 될 명령어

 

nginx 이미지의 Entrypoint와 Command

 

컨테이너 실행 시 Entrypoint와 Command 옵션 설정 (ubuntu:focal 예시)

(컨테이너 실행 시 bash 대신 sh 실행)
$ docker run --entrypoint sh ubuntu:focal

(컨테이너 실행 시 echo hello world 실행)
$ docker run --entrypoint echo ubuntu:focal hello world

관련글 더보기

댓글 영역