# Dockerfile for running MEV Bot tests FROM golang:1.24-alpine AS test # Install build dependencies RUN apk add --no-cache \ git \ make \ gcc \ musl-dev \ linux-headers \ bash # Set working directory WORKDIR /app # Copy go mod files first (for layer caching) COPY go.mod go.sum ./ RUN go mod download # Copy source code COPY . . # Build test binary RUN go test -c ./... # Run tests by default CMD ["go", "test", "-v", "-race", "-coverprofile=coverage.out", "./..."]