mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
One toolchain across the estate. The tree carried 1.26.0, .1, .3, .4 and .5 at once, so which compiler built a binary depended on which repo it came from. Co-authored-by: Hanzo Dev <[email protected]>
31 lines
693 B
Docker
31 lines
693 B
Docker
# Dockerfile for Kafka Integration Test Setup
|
|
FROM golang:1.26.8-alpine AS builder
|
|
ENV GOTOOLCHAIN=auto
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache git make gcc musl-dev
|
|
|
|
# Copy repository
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
# Build test setup utility from the test module
|
|
WORKDIR /app/test/kafka
|
|
RUN go mod download
|
|
RUN CGO_ENABLED=1 GOOS=linux go build -o /out/test-setup ./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 /out/test-setup /usr/bin/test-setup
|
|
|
|
# Make executable
|
|
RUN chmod +x /usr/bin/test-setup
|
|
|
|
# Default command
|
|
CMD ["/usr/bin/test-setup"]
|