Spaces:
Running
Running
Commit
·
46fbf22
1
Parent(s):
e2374bd
Create Dockerfile
Browse files- Dockerfile +14 -0
Dockerfile
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM golang:alpine AS builder
|
2 |
+
RUN apk update
|
3 |
+
RUN apk add git
|
4 |
+
WORKDIR /app
|
5 |
+
RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git
|
6 |
+
WORKDIR /app/go-proxy-bingai
|
7 |
+
RUN go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go
|
8 |
+
|
9 |
+
FROM alpine
|
10 |
+
WORKDIR /app/go-proxy-bingai
|
11 |
+
COPY --from=builder /app/go-proxy-bingai .
|
12 |
+
|
13 |
+
EXPOSE 8080
|
14 |
+
CMD ["/app/go-proxy-bingai/go-proxy-bingai"]
|