Browse Source

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
pull/7526/head
chrislu 7 days ago
parent
commit
459ff0bd38
  1. 10
      docker/Dockerfile.local

10
docker/Dockerfile.local

@ -1,8 +1,9 @@
FROM alpine AS final FROM alpine AS final
LABEL author="Chris Lu" 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 RUN mkdir -p /etc/seaweedfs
COPY ./filer.toml /etc/seaweedfs/filer.toml COPY ./filer.toml /etc/seaweedfs/filer.toml
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
@ -10,8 +11,7 @@ COPY ./entrypoint.sh /entrypoint.sh
# Install dependencies and create non-root user # Install dependencies and create non-root user
RUN apk add --no-cache fuse curl su-exec && \ RUN apk add --no-cache fuse curl su-exec && \
addgroup -g 1000 seaweed && \ 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 # volume server grpc port
EXPOSE 18080 EXPOSE 18080

Loading…
Cancel
Save