diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f116ef2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# Build stage +FROM golang AS builder +WORKDIR /app +COPY . . +RUN go mod download +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o PM-BasicApi + +# Production stage +FROM alpine +WORKDIR /app +COPY --from=builder /app/PM-BasicApi /app/PM-BasicApi +ENTRYPOINT ["/app/PM-BasicApi"] \ No newline at end of file