- Added Dockerfile with multi-stage build (Go 1.25rc1-alpine) - Added docker-compose.yml for easy deployment - Added .dockerignore for efficient builds - Bot now runs in Podman/Docker container as intended 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
781 B
Docker
39 lines
781 B
Docker
# MEV Flash Loan Bot - Production Dockerfile
|
|
FROM golang:1.25rc1-alpine AS builder
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache git gcc musl-dev
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy go mod files
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o mev-flashloan cmd/mev-flashloan/main.go
|
|
|
|
# Final stage - minimal runtime image
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy binary from builder
|
|
COPY --from=builder /build/mev-flashloan .
|
|
|
|
# Create non-root user
|
|
RUN addgroup -S mevbot && adduser -S mevbot -G mevbot
|
|
USER mevbot
|
|
|
|
# Expose metrics port (optional)
|
|
EXPOSE 9090
|
|
|
|
# Run the bot
|
|
ENTRYPOINT ["./mev-flashloan"]
|
|
CMD ["--min-profit", "10"]
|