Commands.app

docker exec

Container Management

Execute a command in a running container

Options & Flags
Available options for this command
-it

Interactive terminal

-d

Detached mode

Examples
Common usage examples

Open bash shell in container

docker exec -it mycontainer bash

Run ls command in container

docker exec mycontainer ls /app
Notes
  • Container must be running
Related Commands
You might also find these useful