Spaces:
Running
Running
Download Dockerfile from miss-clean-spa/api: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/spaces/miss-clean-spa/api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/miss-clean-spa/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/miss-clean-spa/api/resolve/main/Dockerfile
468 Bytes
| FROM golang:1.23-alpine AS builder | |
| RUN apk add --no-cache git ca-certificates | |
| WORKDIR /app | |
| COPY go.mod go.sum ./ | |
| RUN go mod download | |
| COPY . . | |
| RUN CGO_ENABLED=0 GOOS=linux go build -o /app/api | |
| FROM alpine:3.20 | |
| RUN apk add --no-cache ca-certificates tzdata | |
| RUN adduser -D -u 1000 user | |
| WORKDIR /app | |
| COPY --from=builder /app/api /app/api | |
| RUN mkdir -p /app/pb_data && chown -R user:user /app | |
| EXPOSE 7860 | |
| USER user | |
| CMD ["./api", "serve", "--http=0.0.0.0:7860"] | |