Skip to content

Commit 4393eac

Browse files
gwleclercclaude
andcommitted
fix(docker): make the embedded binary executable in the image
GitHub artifacts don't preserve the executable bit, so the binary the deploy job downloads and packages is 0644, and the scratch image can't exec it — the published image failed at startup with "/smocker ... not executable". COPY --chmod=0755 sets the mode at copy time, fixing both the artifact-based deploy build and local builds. The build-job smoke test missed this because it builds the binary locally (0755) rather than from the uploaded artifact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4558fe3 commit 4393eac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ ARG TARGETOS
1515
ARG TARGETARCH
1616
ARG TARGETVARIANT
1717
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
18-
COPY build/smocker-${TARGETOS}-${TARGETARCH}${TARGETVARIANT} /smocker
18+
# --chmod: GitHub artifacts don't preserve the executable bit, so the downloaded binary the
19+
# deploy job packages is 0644 — force 0755 here or scratch can't exec it.
20+
COPY --chmod=0755 build/smocker-${TARGETOS}-${TARGETARCH}${TARGETVARIANT} /smocker
1921
# Run unprivileged (nobody); ports are >1024 and a mounted persistence dir must be writable by it.
2022
USER 65534:65534
2123
ENTRYPOINT ["/smocker"]

0 commit comments

Comments
 (0)