M1 docker run & docker start, stop, rm

ImOk·2022년 3월 23일
0

🐳 Docker

목록 보기
2/5
post-thumbnail

docker run

Usage

docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Options

Name, shorthandDescription
--attach , -aAttach to STDIN, STDOUT or STDERR
--detach , -dRun container in background and print container ID
--env , -eSet environment variables
--publish , -pPublish a container's port(s) to the host
--volume , -vBind mount a volume [ -v host dir : container volume dir ]
--privilegedGive extended privileges to this container
--nameAssign a name to the container
--networkConnect a container to a network
--platformSet platform if server is multi-platform capable
--tty , -tAllocate a pseudo-TTY
--interactive , -iKeep STDIN open even if not attached

Examples

# docker 로 zeppelin 이미지 실행 
# 구동 directory 내에 logs 폴더와 notebook 폴더를 생성하고 docker path 에 마운트
# zeppelin:0.8.2
$docker run -p 4040:4040 -p 8080:8080 --platform linux/amd64 --name zeppelin --privileged=true -v $PWD/logs:/logs -v $PWD/notebook:/notebook -e ZEPPELIN_NOTEBOOK_DIR='/notebook' -e ZEPPELIN_LOG_DIR='/logs' -d apache/zeppelin:0.8.2 /zeppelin/bin/zeppelin.sh

# zeppelin:0.10.0
$docker run -p 4040:4040 -p 8080:8080 --platform linux/amd64 --name zeppelin --privileged=true -v $PWD/logs:/logs -v $PWD/notebook:/notebook -e ZEPPELIN_NOTEBOOK_DIR='/notebook' -e ZEPPELIN_LOG_DIR='/logs' -d apache/zeppelin:0.10.0 /opt/zeppelin/bin/zeppelin.sh

docker stop

Usage

docker stop [OPTIONS] CONTAINER [CONTAINER...]

Examples

$docker stop my_container

docker start

Usage

docker start [OPTIONS] CONTAINER [CONTAINER...]

Examples

$docker start my_container

docker rm

Usage

docker rm [OPTIONS] CONTAINER [CONTAINER...]

Examples

$docker rm my_container
profile
ImOk👌

0개의 댓글