Skip to content

Commit 8a38ae6

Browse files
authored
Create Dockerfile
1 parent 85d1696 commit 8a38ae6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM golang:alpine AS builder
2+
3+
WORKDIR /build
4+
# proxy
5+
# ENV GO111MODULE=on \
6+
# GOPROXY=https://goproxy.cn,direct
7+
COPY . .
8+
RUN go mod download
9+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-mcp-postgres
10+
11+
FROM alpine
12+
13+
WORKDIR /app
14+
COPY --from=builder /build/go-mcp-postgres /app/go-mcp-postgres
15+
16+
CMD ["./go-mcp-postgres"]

0 commit comments

Comments
 (0)