Files
seaweedfs/test/kafka/Dockerfile.test-setup
T
2025-09-14 10:52:23 -07:00

39 lines
792 B
Docker

# Dockerfile for Kafka Integration Test Setup
FROM golang:1.24-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git make gcc musl-dev
# Set working directory
WORKDIR /app
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build test setup utility
RUN CGO_ENABLED=1 GOOS=linux go build -o test-setup ./test/kafka/cmd/setup
# Final stage
FROM alpine:latest
# Install runtime dependencies
RUN apk --no-cache add ca-certificates curl jq netcat-openbsd
# Copy binary from builder
COPY --from=builder /app/test-setup /usr/bin/test-setup
# Copy test data and schemas
COPY test/kafka/testdata/ /testdata/
# Make executable
RUN chmod +x /usr/bin/test-setup
# Default command
CMD ["/usr/bin/test-setup"]