Pack Hosting Panel

Command - docker:compose:exec

How to use the `docker:compose:exec` command

We assume you are already familiar with the docker basics.

The docker:compose:exec command executes a command in a running container. The command acts as a wrapper around the default command: https://docs.docker.com/compose/reference/exec/.

  Execute a command in a running container

  docker:compose:exec [options] [--] <service> <docker_command> [<args>...]
This command is a wrapper around the default `docker-compose` command. For more information see https://docs.docker.com/compose/reference/exec/

For security purposes the use of `--privileged` is not possible

  service                          Service
  docker_command                   Command
  args                             Command args

      --detach                     Detached mode: Run command in the background.
      --index=INDEX                index of the container if there are multiple instances of a service [default: 1]
  -e, --env=ENV                    Set environment variables (--env KEY=VAL) (multiple values allowed)
  -f, --file=FILE                  Specify an alternate compose file [default: "docker-compose.yml"]
  -p, --project-name=PROJECT-NAME  Specify an alternate project name
  -h, --help                       Display this help message
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi                       Force ANSI output
      --no-ansi                    Disable ANSI output
  -n, --no-interaction             Do not ask any interactive question
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug