|
|
|
|
|
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 693fb7b0600ba05a5895bc174bd9530ba6c1c784 |
|
|
|
|
|
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"] |