Create Dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM golang:alpine AS builder
|
| 2 |
+
|
| 3 |
+
RUN apk --no-cache add git
|
| 4 |
+
|
| 5 |
+
RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git /workspace/app
|
| 6 |
+
|
| 7 |
+
WORKDIR /workspace/app
|
| 8 |
+
|
| 9 |
+
RUN go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go
|
| 10 |
+
|
| 11 |
+
FROM alpine
|
| 12 |
+
|
| 13 |
+
WORKDIR /workspace/app
|
| 14 |
+
|
| 15 |
+
COPY --from=builder /workspace/app/go-proxy-bingai .
|
| 16 |
+
|
| 17 |
+
ENV Go_Proxy_BingAI_USER_TOKEN_1="kJs8hD92ncMzLaoQWYtX5rG6bE3fZ4i0"
|
| 18 |
+
|
| 19 |
+
EXPOSE 8000
|
| 20 |
+
|
| 21 |
+
CMD ["/workspace/app/go-proxy-bingai"]
|
| 22 |
+
|