FROM golang:1.24-alpine # Install necessary tools RUN apk add --no-cache \ curl \ netcat-openbsd \ bash \ git \ build-base # Set working directory WORKDIR /workspace # Copy go mod files first for better caching COPY go.mod go.sum ./ RUN go mod download # Copy only the necessary source code for building and testing COPY weed/ ./weed/ COPY test/mq/integration/ ./test/mq/integration/ # Install test dependencies RUN go install github.com/onsi/ginkgo/v2/ginkgo@latest # Note: testify is a library, not a binary, so it's installed via go mod download # Build the weed binary for testing (optional - tests can use external cluster) RUN cd weed && go build -o ../weed . # Create test results directory RUN mkdir -p /test-results # Set up environment ENV CGO_ENABLED=1 ENV GOOS=linux ENV GO111MODULE=on # Default working directory for tests WORKDIR /workspace # Entry point for running tests ENTRYPOINT ["/bin/bash"]