# FROM linweiyuan/chatgpt-proxy-server-warp # ENV SUDO_USER_NAME dvc890 # WORKDIR /app # RUN pacman -Sy --needed --noconfirm go # ENV PATH="/usr/local/go/bin:${PATH}" # COPY . . # RUN go build -ldflags="-w -s" -o go-chatgpt-api main.go # # RUN apk add --no-cache tzdata # # ENV TZ=Asia/Shanghai # EXPOSE 8080 # EXPOSE 9515 # EXPOSE 40000 # EXPOSE 65535 # ENV CHATGPT_PROXY_SERVER=http://localhost:9515 # ENV GO_CHATGPT_API_PROXY=socks5://0.0.0.0:65535 # ENV LOG_LEVEL=OFF # RUN mkdir -p /var/lib/cloudflare-warp # CMD ["bash", "-c", "/bin/bash /run.sh & sleep 3 && exec /app/go-chatgpt-api"] FROM golang:alpine AS builder WORKDIR /app COPY . . RUN go build -ldflags="-w -s" -o go-chatgpt-api main.go FROM alpine WORKDIR /app COPY --from=builder /app/go-chatgpt-api . RUN apk add --no-cache tzdata ENV TZ=Asia/Shanghai EXPOSE 8080 CMD ["/app/go-chatgpt-api"]