feat: ship hadolint natively so docker repos stop curling it every CI run #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The docker type baseline in gravityfargo/templates lints the Dockerfile in
.forgejo/workflows/checks.yml. The image has no hadolint, so every pull-request run installs one first:Repos carrying that step today: bluesky-pds-docker, bluesky-post-action, athena-archive-ci-image, commitizen-ci, and this repo itself.
Three problems with it:
envblock in each repo. The shared Renovate preset has no custom manager for it, so moving hadolint forward is a fleet-wide workflow edit instead of an image tag bump the existing wiring already handles.Linux-x86_64.Locally the story is already fine —
docker/Makefilerunshadolint/hadolint:v2.14.0-alpineas its own container, so docker is the only requirement. CI is the only place the curl exists.Ask
Install hadolint into the image, pinned in the Dockerfile the same way prettier is (
npm install --global prettier@3.8.1). It is a single static binary with no runtime dependencies.Once it ships, the checks workflow collapses to:
and the version comes under the same Renovate coverage as everything else in the Dockerfile.
Alternatives considered
prettier --check ., so this splits one job across two containers to avoid one download.actions/cache. More YAML in every repo than the curl step it would replace.Downstream
Landing this means the docker baseline drops the install step and the
HADOLINT_VERSIONenv, then gets propagated to the repos listed above. Tracked in gravityfargo/templates#10 — nothing to do here beyond shipping the binary.