FROM golang:1.23-alpine AS builder

WORKDIR /app
COPY . .

RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o operator ./cmd/operator

FROM alpine:3.19

WORKDIR /app
COPY --from=builder /app/operator .

ENTRYPOINT ["./operator"] 