From 459ff0bd38b6df9de777b51b4da02128b3858863 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 22 Nov 2025 13:40:46 -0800 Subject: [PATCH] fix: improve binary copy and chmod in Dockerfile - Copy weed binary explicitly to /usr/bin/weed - Run chmod +x immediately after COPY to ensure executable - Add ls -la to verify binary exists and has correct permissions - Make weed_pub* and weed_sub* copies optional with || true - Simplify RUN commands for better layer caching --- docker/Dockerfile.local | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.local b/docker/Dockerfile.local index d8c99b554..4e3200488 100644 --- a/docker/Dockerfile.local +++ b/docker/Dockerfile.local @@ -1,8 +1,9 @@ FROM alpine AS final LABEL author="Chris Lu" -COPY ./weed /usr/bin/ -COPY ./weed_pub* /usr/bin/ -COPY ./weed_sub* /usr/bin/ +COPY ./weed /usr/bin/weed +RUN chmod +x /usr/bin/weed && ls -la /usr/bin/weed +COPY ./weed_pub* /usr/bin/ || true +COPY ./weed_sub* /usr/bin/ || true RUN mkdir -p /etc/seaweedfs COPY ./filer.toml /etc/seaweedfs/filer.toml COPY ./entrypoint.sh /entrypoint.sh @@ -10,8 +11,7 @@ COPY ./entrypoint.sh /entrypoint.sh # Install dependencies and create non-root user RUN apk add --no-cache fuse curl su-exec && \ addgroup -g 1000 seaweed && \ - adduser -D -u 1000 -G seaweed seaweed && \ - chmod +x /usr/bin/weed /usr/bin/weed_pub* /usr/bin/weed_sub* 2>/dev/null || true + adduser -D -u 1000 -G seaweed seaweed # volume server grpc port EXPOSE 18080