Skip to content

Commit 8524c0f

Browse files
authored
Add Dockerfile
1 parent 7def705 commit 8524c0f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Build stage
2+
FROM golang AS builder
3+
WORKDIR /app
4+
COPY . .
5+
RUN go mod download
6+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o PM-BasicApi
7+
8+
# Production stage
9+
FROM alpine
10+
WORKDIR /app
11+
COPY --from=builder /app/PM-BasicApi /app/PM-BasicApi
12+
ENTRYPOINT ["/app/PM-BasicApi"]

0 commit comments

Comments
 (0)