mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-20 22:27:04 +00:00
- Add Docker Compose setup with Keycloak OIDC provider - Configure test realm with users, roles, and S3 client - Implement automatic detection between Keycloak and mock OIDC modes - Add comprehensive Keycloak integration tests for authentication and authorization - Support real JWT token validation with production-like OIDC flow - Add Docker-specific IAM configuration for containerized testing - Include detailed documentation for Keycloak integration setup Integration includes: - Real OIDC authentication flow with username/password - JWT Bearer token authentication for S3 operations - Role mapping from Keycloak roles to SeaweedFS IAM policies - Comprehensive test coverage for production scenarios - Automatic fallback to mock mode when Keycloak unavailable
34 lines
779 B
Docker
34 lines
779 B
Docker
# Multi-stage build for SeaweedFS S3 with IAM
|
|
FROM golang:1.23-alpine AS builder
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache git make curl wget
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build SeaweedFS with IAM integration
|
|
RUN cd weed && go build -o /usr/local/bin/weed
|
|
|
|
# Final runtime image
|
|
FROM alpine:latest
|
|
|
|
# Install runtime dependencies
|
|
RUN apk add --no-cache ca-certificates wget curl
|
|
|
|
# Copy weed binary
|
|
COPY --from=builder /usr/local/bin/weed /usr/local/bin/weed
|
|
|
|
# Create directories
|
|
RUN mkdir -p /etc/seaweedfs /data
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --quiet --tries=1 --spider http://localhost:8333/ || exit 1
|
|
|
|
# Set entrypoint
|
|
ENTRYPOINT ["/usr/local/bin/weed"]
|