Run a command in a running container 在正在运行的容器中运行命令
用法
1
docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
选项
1 2 3 4 5 6 7 8 9 10
Options: --detach , -d Detached mode: run command in the background --detach-keys Override the key sequence for detaching a container --env , -e Set environment variables --env-file Read in a file of environment variables --interactive , -i Keep STDIN open even if not attached --privileged Give extended privileges to the command --tty , -t Allocate a pseudo-TTY --user , -u Username or UID (format: <name|uid>[:<group|gid>]) --workdir , -w Working directory inside the container