liveBook · Manning

Feature-level setting

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

A feature-level setting is configuration that changes application behavior between releases or runtime contexts.

A feature-level setting changes application behavior between releases or runtime contexts. It belongs alongside release-level and environment-level settings in a configuration model. section 18.1

Apply feature-level settings through layered configuration:

  • Package default settings in the container image. section 18.1
  • Load environment-specific overrides from a mounted configuration directory. section 18.1
  • Override individual features with environment variables. section 18.1

Changing metrics per container

Run the same image with different configuration layers. One container uses packaged defaults with metrics enabled; another mounts development settings that disable metrics; a final override sets APP_METRICS_ENABLED=true. Query each container’s configuration API to verify the result. section 18.1

# switch to the exercise folder:
cd ch18/exercises/access-log
# run a container with the default config in the image:
docker run -d -p 8080:80 diamol/ch18-access-log:2e
# run a container loading a local config file override:
docker run -d -p 8081:80 `
 -v "$(pwd)/config/dev:/app/config-override" `
 diamol/ch18-access-log:2e
# check the config APIs in each container:
curl http:/./localhost:8080/config
curl http:/./localhost:8081/config

Run the containers and curl their configuration APIs to observe feature-level overrides directly. section 18.1

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

How deep it goes
Defines the category and demonstrates layered overrides, but does not detail configuration-library internals.
Examples
Uses metrics enablement, development overrides, Docker containers, and configuration API checks.
What you can do after
Operate/configure containers with file and environment-variable overrides for selected application features.
How it connects
Connects release-level settings, environment-level settings, configuration files, environment variables, and containers.

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.