docker run
Usage
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Options
Name, shorthand | Description |
---|
--attach , -a | Attach to STDIN, STDOUT or STDERR |
--detach , -d | Run container in background and print container ID |
--env , -e | Set environment variables |
--publish , -p | Publish a container's port(s) to the host |
--volume , -v | Bind mount a volume [ -v host dir : container volume dir ] |
--privileged | Give extended privileges to this container |
--name | Assign a name to the container |
--network | Connect a container to a network |
--platform | Set platform if server is multi-platform capable |
--tty , -t | Allocate a pseudo-TTY |
--interactive , -i | Keep STDIN open even if not attached |
Examples
$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
$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