Dockerfile.s3 779 B

123456789101112131415161718192021222324252627282930313233
  1. # Multi-stage build for SeaweedFS S3 with IAM
  2. FROM golang:1.23-alpine AS builder
  3. # Install build dependencies
  4. RUN apk add --no-cache git make curl wget
  5. # Set working directory
  6. WORKDIR /app
  7. # Copy source code
  8. COPY . .
  9. # Build SeaweedFS with IAM integration
  10. RUN cd weed && go build -o /usr/local/bin/weed
  11. # Final runtime image
  12. FROM alpine:latest
  13. # Install runtime dependencies
  14. RUN apk add --no-cache ca-certificates wget curl
  15. # Copy weed binary
  16. COPY --from=builder /usr/local/bin/weed /usr/local/bin/weed
  17. # Create directories
  18. RUN mkdir -p /etc/seaweedfs /data
  19. # Health check
  20. HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
  21. CMD wget --quiet --tries=1 --spider http://localhost:8333/ || exit 1
  22. # Set entrypoint
  23. ENTRYPOINT ["/usr/local/bin/weed"]