A team builds one container image, version 42, and runs it in dev, staging and production. If settings were written into the code, each environment would need its own build, and what you tested in staging would not be what runs in production. So anything that differs between environments stays outside the code and the image.
That outside material is configuration: the database address, a feature flag, the log level. The platform injects it when the program starts, through environment variables or a mounted file. The code only asks for a name such as DB_HOST. Change the value, restart, and the same build behaves differently.
Some configuration is more dangerous than the rest. A log level is harmless if a stranger reads it; a database password is not. Configuration that grants access (passwords, API keys, tokens, private keys, certificates) is a secret, and the rest of this lesson is about handling it more carefully.
💡Good to know
Same image everywhere; only the injected settings change.