Download Dockerfile from bingloo/g2api: direct link, hf CLI and curl.
- Browser
- Download file 494 Bytes
-
https://huggingface.co/spaces/bingloo/g2api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/bingloo/g2api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/bingloo/g2api/resolve/main/Dockerfile
494 Bytes
| FROM golang:latest AS builder | |
| WORKDIR /app | |
| RUN git clone https://github.com/bingloo/genspark2api.git . && \ | |
| go mod download && \ | |
| CGO_ENABLED=0 go build -o /app/bin/g2api -ldflags="-w -s" . | |
| FROM alpine:latest | |
| WORKDIR /app | |
| COPY --from=builder /app/bin/g2api . | |
| RUN apk add --no-cache tzdata && \ | |
| chmod +x g2api | |
| ENV TZ=Asia/Shanghai \ | |
| PORT=7050 \ | |
| REQUEST_RATE_LIMIT=1000 \ | |
| AUTO_DEL_CHAT=0 \ | |
| ROUTE_PREFIX=api | |
| ENTRYPOINT ["./g2api"] | |