# Dockerfile for Matrix Scores Bot # --- Build Stage --- FROM golang:1.24-alpine AS builder # Install git for module downloads RUN apk add --no-cache git WORKDIR /app # Cache dependencies COPY go.mod go.sum ./ RUN go mod download # Copy source COPY . . # Build binary RUN go build -o matrix-scores-bot ./main.go # --- Final Stage --- FROM alpine:3.18 # Install certificates RUN apk add --no-cache ca-certificates WORKDIR /root/ # Copy the built binary COPY --from=builder /app/matrix-scores-bot . # Expose any port if needed (Matrix client doesn't listen) # EXPOSE 0 # Set entrypoint ENTRYPOINT ["./matrix-scores-bot"]