1# Build stage
2FROM golang:1.25.5-alpine AS builder
3
4WORKDIR /build
5
6# Install build dependencies
7RUN apk add --no-cache git ca-certificates
8
9# Copy go mod files
10COPY go.mod go.sum ./
11RUN go mod download
12
13# Copy source code
14COPY . .
15
16# Build the application
17RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bloblens ./cmd/bloblens
18
19# Runtime stage
20FROM alpine:latest
21
22RUN apk --no-cache add ca-certificates
23
24WORKDIR /app
25
26# Copy the binary from builder
27COPY --from=builder /build/bloblens .
28
29ENTRYPOINT ["/app/bloblens"]