Skip to content

Commit 51bc754

Browse files
committed
fix(docker): preserve exec bit on prebuilt binary COPY
Adds --chmod=755 to the COPY instructions in the scratch-based prebuilt binary stages. Without this, binaries produced by PR 4a and shuttled through actions/upload-artifact + download-artifact lose their executable bit during the roundtrip, and the resulting image's ENTRYPOINT fails at runtime. Signed-off-by: Jonas Toelke <jtoelke@nvidia.com>
1 parent ad11f92 commit 51bc754

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

deploy/docker/Dockerfile.images

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ FROM gateway-builder AS gateway-binary-build
195195

196196
FROM scratch AS gateway-binary-prebuilt
197197
ARG TARGETARCH
198-
COPY deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell-gateway /build/out/openshell-gateway
198+
# --chmod=755 preserves the executable bit through actions/upload-artifact +
199+
# download-artifact, which strip exec perms during the roundtrip.
200+
COPY --chmod=755 deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell-gateway /build/out/openshell-gateway
199201

200202
FROM gateway-binary-${BINARY_SOURCE} AS gateway-binary
201203

@@ -204,7 +206,9 @@ FROM supervisor-builder AS supervisor-binary-build
204206

205207
FROM scratch AS supervisor-binary-prebuilt
206208
ARG TARGETARCH
207-
COPY deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell-sandbox /build/out/openshell-sandbox
209+
# --chmod=755 preserves the executable bit through actions/upload-artifact +
210+
# download-artifact, which strip exec perms during the roundtrip.
211+
COPY --chmod=755 deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell-sandbox /build/out/openshell-sandbox
208212

209213
FROM supervisor-binary-${BINARY_SOURCE} AS supervisor-binary
210214

0 commit comments

Comments
 (0)