mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user