tom89cn commited on
Commit
7b0110e
·
1 Parent(s): 41c76dd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -6,4 +6,15 @@ FROM golang:alpine AS builder
6
  RUN apk --no-cache add git
7
 
8
  # 从 GitHub 克隆 go-proxy-bingai 项目到 /workspace/app 目录下
9
- RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git /workspace/app
 
 
 
 
 
 
 
 
 
 
 
 
6
  RUN apk --no-cache add git
7
 
8
  # 从 GitHub 克隆 go-proxy-bingai 项目到 /workspace/app 目录下
9
+ RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git /app
10
+
11
+ WORKDIR /app
12
+ COPY . .
13
+ RUN go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go
14
+
15
+ FROM alpine
16
+ WORKDIR /app
17
+ COPY --from=builder /app/go-proxy-bingai .
18
+
19
+ EXPOSE 8080
20
+ CMD ["/app/go-proxy-bingai"]