liveBook · Manning

Environment-level setting

As explained in Learn Docker in a Month of Lunches, Second Edition

An environment-level setting is configuration whose value varies between deployment environments such as development, testing, and production.

An environment-level setting changes between deployment environments such as development, testing, and production. Keep it separate from release-level settings, which remain fixed for a release, and feature-level settings, which control behavior between releases. section 18.1

A practical configuration hierarchy starts with defaults packaged in the image, adds override files from a mounted filesystem, and allows environment variables to replace specific values. This lets identical images run with different environment settings. section 18.1

Run one image in two environments

Run the default container on port 8080, then mount config/dev at /app/config-override and run another copy on port 8081. Query both /config endpoints: the first reports UNKNOWN for the environment name, while the second applies the development override. Add -e APP_METRICS_ENABLED=true to change one setting without changing the file. section 18.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains layered overrides and verifies them with Docker commands, stopping short of detailed library internals.
Examples
Demonstrates default and development containers, mounted override files, configuration APIs, and a metrics environment variable.
What it assumes
Assumes basic Docker command use while introducing configuration categories, override paths, and runtime settings.
What you can do after
Operate Docker containers with mounted configuration overrides and targeted environment-variable changes, then verify effective values through an API.
How it connects
Connects release-level settings, feature-level settings, configuration files, environment variables, Docker containers, and secrets.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.