Skip to main content
Run shell commands inside a Docker development container on your local machine. Commands can be run inline or saved as named aliases for reuse.

Syntax

Options

Arguments

Prerequisites

A development environment must be created first:
This configures the Docker image, mount directory, and shell used by 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

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 --rm so 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 COMMAND argument and --command option are mutually exclusive; use one or the other