FROM golang:1.24-alpine AS builder RUN apk add --no-cache git make protobuf-dev WORKDIR /app COPY go.mod go.sum ./ ENV GOTOOLCHAIN=auto RUN go mod download COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -a -installsuffix cgo -o server cmd/server/main.go FROM alpine:latest RUN apk --no-cache add ca-certificates postgresql-client bash WORKDIR /root/ COPY --from=builder /app/server . COPY --from=builder /app/migrations ./migrations RUN mkdir -p ./config EXPOSE 9091 ENTRYPOINT ["./server"]