Execute a Command in a Development Environment

lager exec

Execute COMMAND in a docker container. COMMAND is a named command which was previously saved using --save-as. If COMMAND is not provided, execute the command specified by --command. If --save-as is also provided, save the command under that name for later use with COMMAND. If EXTRA_ARGS are provided they will be appended to the command at runtime

lager exec [OPTIONS] COMMAND EXTRA_ARGS

Options

--command <'<cmdline>'>

Raw commandline to execute in docker container

--save-as <alias>

Alias under which to save command specified with --command

--warn, --no-warn

Whether to print a warning if overwriting an existing command.

Default

True

--env <env>

Environment variables to set for the python script. Format is --env FOO=BAR - this will set an environment varialbe named FOO to the value BAR

--passenv <passenv>

Environment variables to inherit from the current environment and pass to the python script. This option is useful for secrets, tokens, passwords, or any other values that you do not want to appear on the command line. Example: --passenv FOO will set an environment variable named FOO in the python script to the valueof FOO in the current environment.

-m, --mount <mount>

Name of volume to mount

-i, --interactive, --no-interactive

Keep STDIN open even if not attached

Default

True

-t, --tty, --no-tty

Allocate a pseudo-TTY

Default

True

-u, --user <user>

User to run as in container

-g, --group <group>

Group to run as in container

Arguments

COMMAND

Optional argument

EXTRA_ARGS

Optional argument(s)