Syntax
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--command TEXT | string | Raw shell command to execute (e.g., 'make build') | ||
--save-as TEXT | string | Save the command under this alias for later use | ||
--warn / --no-warn | flag | --warn | Warn when overwriting a saved command | |
--env FOO=BAR | multiple | Set environment variable in the container | ||
--passenv NAME | multiple | Inherit environment variable from current shell | ||
--mount NAME | -m | string | Docker volume to mount | |
--interactive / --no-interactive | -i | flag | --interactive | Keep STDIN open |
--tty / --no-tty | -t | flag | --tty | Allocate a pseudo-TTY |
--user TEXT | -u | string | current UID | User to run as in the container |
--group TEXT | -g | string | current GID | Group to run as in the container |
--verbose | -v | flag | Show the full Docker command being executed | |
--help | Show help message and exit |
Arguments
| Argument | Description |
|---|---|
COMMAND | Name of a previously saved command to run |
EXTRA_ARGS | Additional arguments appended to the command at runtime |
Prerequisites
A development environment must be created first:lager exec.
Command Reference
Run an Inline Command
Save a Command for Reuse
Run a Saved Command
Append Extra Arguments
Pass Environment Variables
How It Differs from Other Commands
| Command | Target | Purpose |
|---|---|---|
lager exec | Local Docker container | Run build/test commands in a reproducible environment |
lager python | Remote Lager Box | Execute Python scripts that interact with test equipment |
lager ssh | Remote Lager Box | Open an interactive SSH shell for box administration |
Saved Command Management
Saved commands are stored in the devenv section of your.lager config. Use lager devenv to manage them:
Examples
Notes
- The container is created with
--rmso it is removed after each command - Exit codes from the container are propagated to the CLI
- Source code is mounted from your local filesystem into the container
- Lager configuration (
~/.lager) is mounted into the container when present - The
COMMANDargument and--commandoption are mutually exclusive; use one or the other

