Environments
An environment is a named overlay on top of your workspace configuration. Use environments when the same checks, generators, or services need different settings in different contexts — for example a different base image in staging than in production.
Create an environment
dagger env create staging
List environments
dagger env list
Remove an environment
dagger env rm staging
Apply an environment
Pass --env to any command to apply an overlay for that run:
dagger --env staging check
dagger --env staging call deploy
Configure an environment
Most per-environment differences are module settings — a base image, a package manager. Set them with dagger settings and --env, which targets that environment's overlay instead of the base configuration:
dagger settings --env staging eslint baseImageAddress node:22-alpine
Reads with --env show the effective view — the base settings with the overlay applied:
dagger settings --env staging eslint
Without --env, you read and write the base configuration, which every environment inherits.
For configuration that isn't a module setting, dagger config is the lower-level key/value interface to .dagger/config.toml and follows the same --env overlay rules.