aifud commited on
Commit
b0868db
·
1 Parent(s): 00e44af

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -1,5 +1,12 @@
1
  FROM golang:alpine AS builder
2
  RUN apk --no-cache add git
3
- WORKDIR /app
4
- COPY . .
5
- RUN git clone https://github.com/adams549659584/go-proxy-bingai.git /workspace/app
 
 
 
 
 
 
 
 
1
  FROM golang:alpine AS builder
2
  RUN apk --no-cache add git
3
+ RUN git clone https://github.com/adams549659584/go-proxy-bingai.git /workspace/app
4
+ WORKDIR /workspace/app
5
+ RUN go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go
6
+
7
+ FROM alpine
8
+ WORKDIR /workspace/app
9
+ COPY --from=builder /app/go-proxy-bingai .
10
+
11
+ EXPOSE 8080
12
+ CMD ["/app/go-proxy-bingai"]