Skip to content

Commit 25b0ea3

Browse files
committed
fix: set executable permissions on binaries in Docker image
COPY without --chmod=755 preserves the source file permissions, which may not include the execute bit depending on the build environment. This caused /nebula: permission denied in distroless containers.
1 parent e89a3c5 commit 25b0ea3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM gcr.io/distroless/static:latest
22

33
ARG TARGETOS TARGETARCH
4-
COPY build/$TARGETOS-$TARGETARCH/nebula /nebula
5-
COPY build/$TARGETOS-$TARGETARCH/nebula-cert /nebula-cert
4+
COPY --chmod=755 build/$TARGETOS-$TARGETARCH/nebula /nebula
5+
COPY --chmod=755 build/$TARGETOS-$TARGETARCH/nebula-cert /nebula-cert
66

77
VOLUME ["/config"]
88

0 commit comments

Comments
 (0)