Skip to content
This is the documentation for v0.2. Read the latest.

dicer compose exec

Run a command inside a service’s running instance

Synopsis

Runs a command inside a service’s instance, /bin/sh if none is given, as dicer exec does. Flags go before the service: everything after it is the command’s.

dicer compose exec [flags] SERVICE [COMMAND [ARG...]]

Examples

  dicer compose exec db
  dicer compose exec db psql -U postgres
  dicer compose exec -T web cat /etc/nginx/nginx.conf > nginx.conf

Options

  -t, --tty               Allocate a pseudo-TTY (default: when stdin and stdout are a terminal)
  -T, --no-tty            Do not allocate a pseudo-TTY
  -e, --env stringArray   Environment variable as KEY=VALUE, or KEY to pass this shell's value (repeatable)
  -w, --workdir string    Working directory inside the instance
      --timeout int32     Kill the command after this many seconds (0: no limit)
  -h, --help              help for exec

Options inherited from parent commands

  -D, --debug           Trace every call to the daemon on stderr (or set $DICER_DEBUG)
  -r, --remote string   Daemon to talk to: a remote's name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local)

SEE ALSO

  • dicer compose - Run a project of instances described in a compose file