Validate container changes
See Container validation approach for the coverage and design choices behind these checks.
Local checks
The lint workflow runs the repository's pre-commit hooks on every pull request. Run the same checks locally before committing:
shell
pre-commit run --all-filesTo run only the container-related checks:
shell
pre-commit run hadolint --all-files
pre-commit run validate-compose --all-filesThe Hadolint hook uses a pinned container image, so it requires a working Docker daemon. The Compose validator requires Docker Compose, but it only renders the configuration and does not start containers.
Address error-level Hadolint findings before submitting. The Hadolint policy also makes these rules blocking:
DL3002: the final container user must not be rootDL3006: base images must have an explicit tagDL3007: base images must not use thelatesttag
Warnings remain visible without failing the check.
Register a Compose override
- Add
overrides/compose.<name>.yaml. - Add the override to at least one realistic entry in
tests/compose-configs.json. - Add harmless placeholder values to the registry's top-level
environmentobject if the override introduces required variables that are not inexample.env. - Run
python .github/scripts/validate_compose.py.
