Options (6)
booleanRun command in a new container from a tagged image
docker {{[run|container run]}} {{image:tag}} {{command}}-d, --detachbooleanRun command in a new container in background and display its ID
docker {{[run|container run]}} {{[-d|--detach]}} {{image}} {{command}}booleanRun command in a one-off container in interactive mode and pseudo-TTY
docker {{[run|container run]}} --rm {{[-it|--interactive --tty]}} {{image}} {{command}}-e, --envbooleanRun command in a new container with passed environment variables
docker {{[run|container run]}} {{[-e|--env]}} '{{variable}}={{value}}' {{[-e|--env]}} {{variable}} {{image}} {{command}}-v, --volumebooleanRun command in a new container with bind mounted volumes
docker {{[run|container run]}} {{[-v|--volume]}} /{{path/to/host_path}}:/{{path/to/container_path}} {{image}} {{command}}-p, --publishbooleanRun command in a new container with published ports
docker {{[run|container run]}} {{[-p|--publish]}} {{host_port}}:{{container_port}} {{image}} {{command}}Examples (8)
Run command in a new container in background and display its ID
Run command in a one-off container in interactive mode and pseudo-TTY
Run command in a new container with passed environment variables
Run command in a new container with bind mounted volumes
Run command in a new container with published ports
Run command in a new container overwriting the entrypoint of the image
Run command in a new container connecting it to a network
docker [run|container run] --network network image