Download Dockerfile from cacode/cursor: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/spaces/cacode/cursor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/cacode/cursor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/cacode/cursor/resolve/main/Dockerfile
940 Bytes
| # Build stage | |
| FROM golang:1.24-bookworm AS builder | |
| ENV GO111MODULE=on | |
| WORKDIR /app | |
| COPY go.mod go.sum ./ | |
| RUN go mod download | |
| COPY . . | |
| # Build a static binary | |
| RUN CGO_ENABLED=0 GOOS=linux go build -a -o cursor2api-go . | |
| # Runtime stage | |
| FROM node:20-bookworm-slim | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| ENV PORT=7860 | |
| WORKDIR /app | |
| COPY --from=builder /app/cursor2api-go /app/ | |
| COPY --from=builder /app/static /app/static | |
| COPY --from=builder /app/jscode /app/jscode | |
| # Non-root user (HF Spaces friendly) | |
| RUN chown -R node:node /app | |
| USER node | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | |
| CMD node -e "const http=require('http');const port=process.env.PORT||7860;http.get('http://127.0.0.1:'+port+'/health',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1));" | |
| CMD ["./cursor2api-go"] | |