Skip to content

Commit 3cecef2

Browse files
authored
Merge pull request #329 from smocker-dev/fix/docker-exec-bit
fix(docker): make the embedded binary executable in the image
2 parents 4558fe3 + 4393eac commit 3cecef2

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)