1 Commits
Author SHA1 Message Date
rmcguireandClaude Opus 5 7a81afec65 Lint by piping files to the linters instead of bind-mounting
Build Images / ${{ fromJSON(needs.select.outputs.images) }} (push) Successful in 3m33s
Build Images / Select images (push) Successful in 41s
Lint / lint (push) Successful in 44s
`make lint` passed locally but failed in Gitea Actions with every Dockerfile
reported as missing:

    hadolint: images/node-agent/Dockerfile: withBinaryFile: does not exist

The job itself runs in a container, and the checkout lives in a docker volume
rather than on the host filesystem. Starting hadolint as a sibling container
through the host's docker socket meant `-v "$(CURDIR)":/repo` was resolved
against the HOST, where /workspace/... does not exist — so Docker created an
empty directory and mounted that.

Stream each file in on stdin instead. No shared filesystem is involved, so the
same command works locally and in CI. The linters then only ever see "-" as the
filename, so hack/lint.sh prints the real path itself, and only on failure.

Reproduced the original error and verified the fix against a faithful local
simulation: the repo in a docker volume at a path absent from the host, with
the socket mounted, running the real runner image.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-08-09 11:48:50 -04:00