docker container exec

Execute a command in a running container

Usage

docker container exec [OPTIONS] CONTAINER COMMAND [ARG...]

Description

See docker exec for more information.

Options

OptionShortDefaultDescription
--detach-dDetached mode: run command in the background
--detach-keysOverride the key sequence for detaching a container
--env-eAPI 1.25+ Set environment variables
--env-fileAPI 1.25+ Read in a file of environment variables
--interactive-iKeep STDIN open even if not attached
--privilegedGive extended privileges to the command
--tty-tAllocate a pseudo-TTY
--user-uUsername or UID (format: <name|uid>[:<group|gid>])
--workdir-wAPI 1.35+ Working directory inside the container