|
|
|
|
|
FROM golang:alpine AS builder |
|
|
|
|
|
RUN apk --no-cache add git |
|
|
|
|
|
RUN git clone https://github.com/Harry-zklcdc/go-proxy-bingai.git /workspace/app |
|
|
|
RUN cd /workspace/app && git reset --hard 922b8c47d2d5c6e77137f29b78c8da3de95be841 |
|
|
|
|
|
WORKDIR /workspace/app |
|
|
|
|
|
RUN go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go |
|
|
|
|
|
|
|
FROM alpine |
|
|
|
|
|
WORKDIR /workspace/app |
|
|
|
|
|
COPY --from=builder /workspace/app/go-proxy-bingai . |
|
|
|
|
|
ENV Go_Proxy_BingAI_USER_TOKEN_1="kJs8hD92ncMzLaoQWYtX5rG6bE3fZ4iO" |
|
|
|
|
|
|
|
EXPOSE 8080 |
|
|
|
|
|
CMD ["/workspace/app/go-proxy-bingai"] |