Skip to main content
lager box-config manages a declarative configuration for a Lager Box’s container. You describe what the box should have — USB device permissions (udev rules), apt packages, bind mounts, environment variables, pip/cargo/npm packages, sysctl values — and then apply puts it into effect. The configuration persists across container restarts and box updates.

Syntax

Global Options

How It Works

Editing the config and putting it into effect are two separate steps:
  1. Change the configudev add, apt add, mount add, env set, etc. These only edit the stored config; nothing happens on the box yet.
  2. Apply itlager box-config apply validates the config and restarts (“bounces”) the container so the changes take effect. Host-side pieces (apt packages, udev rules, sysctl) are installed on the box host during apply; everything else is mounted into the fresh container.

Commands

Lifecycle Provisioning

Command Reference

udev

Grant a USB device read/write access from inside the container, by USB vendor/product id. Use this when a freshly-plugged device is owned by root and a tool inside the container can’t open it (for example dfu-util failing with “No DFU capable USB device available”).
VID and PID are 4 hex digits each. A 0x prefix and uppercase are accepted and normalized (so 0x1AB1:0E11 becomes 1ab1:0e11). Re-adding the same vid:pid updates it in place.
On apply, the rules are installed to /etc/udev/rules.d/99-lager-user.rules on the box host and udev is reloaded, so existing devices pick up the new permissions.

reset

Erase the config to a truly empty state. Unlike init (which re-seeds the default box-tools volume), reset clears everything — a clean slate.

restart

Restart the container without changing the config — a fresh container with the same setup. Useful for test isolation between runs. Unlike apply, it restarts unconditionally (it does not skip when the config is unchanged).

apply

Validate the config and restart the container so changes take effect.
--box accepts a comma-separated list to apply across multiple boxes.

apt

Host-side apt packages (installed on the box host during apply).

mount

Bind-mount a host path into the container.
mount add options:

env

Container environment variables.

pip / cargo / npm

In-container language packages, installed when the container starts.
pip add validates against PyPI by default; pass --no-validate-pypi to skip.

sysctl

Host sysctl values, persisted across reboots.

volume

Named docker volumes attached to the container (persist data across restarts).

Inspecting and editing

Backup, restore, and recovery


Notes

  • Most editing commands only change the stored config — run apply to put changes into effect.
  • udev rules, apt packages, and sysctl values are applied to the box host; mounts, env, and pip/cargo/npm apply inside the container.
  • The config persists across container restarts and box updates. A user udev file (99-lager-user.rules) is preserved across lager update.
  • --box accepts a name (from lager boxes) or an IP address.