# Pin specific version for stability
# Use alpine for reduced image size
FROM golang:1.19-alpine

WORKDIR /app 

COPY . .

RUN go mod download

# Compile application during build rather than at runtime
RUN go build -o api-golang

CMD ["./api-golang"]
