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

dicer exec

Runs a command inside a running instance, /bin/sh if none is given.

A pseudo-TTY is allocated when this terminal is on both ends – stdin and stdout – so a shell is interactive, and output piped elsewhere is not mangled by one. -t and -T force it on or off. Flags go before the name: everything after it is the command’s.

Usage

$ dicer exec [flags] NAME [COMMAND [ARG...]]

Examples

$ dicer exec web
$ dicer exec web ls -la /srv
$ dicer exec -e DEBUG=1 -w /srv web ./check.sh
$ dicer exec -T web cat /var/log/app.log > app.log

Flags

FlagDescription
-e, --env stringArrayEnvironment variable as KEY=VALUE, or KEY to pass this shell’s value (repeatable).
-T, --no-ttyDo not allocate a pseudo-TTY.
--timeout int32Kill the command after this many seconds (0: no limit).
-t, --ttyAllocate a pseudo-TTY (default: when stdin and stdout are a terminal).
-w, --workdir stringWorking directory inside the instance.

Global flags

FlagDescription
-D, --debugTrace every call to the daemon on stderr (or set $DICER_DEBUG).
-r, --remote stringDaemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local).