-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
area:ciCI/CD, GitHub Actions, workflowsCI/CD, GitHub Actions, workflowsarea:imageContainer image, Dockerfile, buildContainer image, Dockerfile, buildchoreGeneral tasks (e.g. update dependencies, contact a manufacturer, read a paper)General tasks (e.g. update dependencies, contact a manufacturer, read a paper)effort:smallLess than 1 hourLess than 1 hoursemver:patchBug fix, backward-compatibleBug fix, backward-compatible
Milestone
Description
Chore Type
CI / Build change
Description
Add hadolint static analysis for all Containerfiles in the repository. Hadolint enforces Dockerfile best practices (pinned base image tags, consolidated RUN layers, pinned apk/apt versions, etc.) and integrates shellcheck for inline RUN scripts.
Acceptance Criteria
-
hadolintpre-commit hook added to.pre-commit-config.yaml, pinned by SHA -
Containerfilepasses hadolint with no warnings -
tests/fixtures/sidecar.Containerfilepasses hadolint with no warnings -
uv run pre-commit run --all-filesexits clean
Implementation Notes
- Use
hadolint-dockerhook fromhttps://github.com/hadolint/hadolint, pinned to346e4199e4baca7d6827f20ac078b6eee5b39327(v2.9.3) DL3018(unpinned apk packages) should be suppressed inline with# hadolint ignore=DL3018in fixture files where pinning individual package versions would be brittle- The main
Containerfilemay need fixes after the hook is wired in
Related Issues
None
Priority
Medium
Changelog Category
Added
Additional Context
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:ciCI/CD, GitHub Actions, workflowsCI/CD, GitHub Actions, workflowsarea:imageContainer image, Dockerfile, buildContainer image, Dockerfile, buildchoreGeneral tasks (e.g. update dependencies, contact a manufacturer, read a paper)General tasks (e.g. update dependencies, contact a manufacturer, read a paper)effort:smallLess than 1 hourLess than 1 hoursemver:patchBug fix, backward-compatibleBug fix, backward-compatible