fix: migrate Dockerfile lint stages to test-tools:local (#106)#25
Merged
Conversation
Inline bats-src / bats-extensions / lint-tools stages had hardcoded linux.x86_64 / Linux-x86_64 download URLs. On arm64 hosts (Jetson, Graviton) they pulled unusable binaries; the `test` stage then exited at `shellcheck -S warning /lint/*.sh`. `./build.sh devel` still worked because devel doesn't need lint tools, but `./build.sh test` and the CI `docker-build` check broke on arm64. Template's `Dockerfile.test-tools` builds an arch-aware shellcheck + hadolint + bats bundle (keyed off BuildKit's TARGETARCH). `./build.sh` and `build-worker.yaml` already build `test-tools:local` before the main build, so consumers just COPY from it. Delete 19 lines of inline stages; switch 4 COPY --from=... lines to --from=test-tools:local; net -17 lines. bats-extensions COPY dropped because test-tools:local bundles bats-support / bats-assert under /usr/lib/bats. Verified: ./build.sh --no-env test on amd64 — 28/28 smoke tests pass.
v0.9.11's build-worker.yaml had a latent bug (discarded test-tools image, docker.io pull fail). v0.9.12 ships the load:true fix — this is the first PR exercising the test-tools:local pattern downstream, so must pin to v0.9.12. template/ subtree stays at v0.9.11 locally (CI uses the remote @tag, not the subtree); a full subtree upgrade to v0.9.12 can follow in a separate PR.
v0.9.12's load:true attempt didn't actually share images between buildx steps (docker/build-push-action#581). Template v0.9.13 ships D plan: test-tools is published to ghcr.io/ycpss91255-docker/test-tools:<tag> per release, and build-worker.yaml passes the GHCR tag via TEST_TOOLS_IMAGE build-arg instead of building test-tools:local in-job. Dockerfile changes: - Top-level ARG TEST_TOOLS_IMAGE="test-tools:local" default keeps local ./build.sh flow unchanged (builds Dockerfile.test-tools into host Docker daemon). - New FROM ${TEST_TOOLS_IMAGE} AS test-tools-stage alias. - 4 COPY --from=test-tools:local switched to --from=test-tools-stage. main.yaml: @v0.9.12 → @v0.9.13 so build-worker passes the resolved GHCR tag for this build. Verified locally: ./build.sh --no-env test on amd64 — 28/28 smoke tests pass, build succeeds with the default test-tools:local ARG.
This was referenced Apr 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes template issue #106 for this repo.
Inline
bats-src/bats-extensions/lint-toolsstages inDockerfilehardcodedlinux.x86_64/Linux-x86_64download URLs, so on arm64 hosts (Jetson, Graviton) they pulled unusable binaries and./build.sh testbroke atshellcheck -S warning /lint/*.sh../build.sh develkept working because devel doesn't need lint tools.Migrated to template's pre-built arch-aware
test-tools:localimage (template/dockerfile/Dockerfile.test-toolskeys off BuildKit'sTARGETARCH)../build.shandbuild-worker.yamlalready buildtest-tools:localbefore the main build.COPY --from=...lines switched to--from=test-tools:localbats-extensionsCOPY dropped (test-tools:local bundles bats-support / bats-assert under/usr/lib/bats)Net: -17 lines.
Test plan
./build.sh --no-env teston amd64 — 28/28 smoke tests pass, lint greencall-docker-build / build (linux/amd64)greengit pull && ./build.sh testexercises the arm64 pathNotes
dev_bridge.sh(untracked local WIP helper at repo root) left alone per maintainer instruction.