TOOL » VIRTUAL_ENVIRONMENT » DOCKER

Exec

Usage

shell
docker exec OPTIONS CONTAINER COMMAND
OptionDescription
-d --detachDetached mode: run command in the background.
-e --envSet environment variables.
-i --interactiveKeep STDIN open even if not attached.
-t --ttyAllocate a pseudo-TTY.
-u --userUsername or UID.
-w --workdirWorking directory inside the container.

Example

Run a shell inside a container.

shell
docker exec -it container bash