Download Dockerfile from axyut/niyam-api: direct link, hf CLI and curl.
- Browser
- Download file 539 Bytes
-
https://huggingface.co/spaces/axyut/niyam-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/axyut/niyam-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/axyut/niyam-api/resolve/main/Dockerfile
539 Bytes
| FROM golang:1.24.2-alpine AS builder | |
| WORKDIR /app | |
| ENV GO111MODULE=on \ | |
| CGO_ENABLED=0 | |
| COPY go.mod go.sum ./ | |
| RUN go mod download | |
| COPY . . | |
| # -ldflags "-s -w": Strips debug symbols and DWARF tables, significantly reducing binary size. | |
| RUN go build -o /app/niyam -ldflags "-s -w" ./main.go | |
| FROM scratch | |
| WORKDIR /app | |
| # Copy only the compiled binary from the 'builder' stage | |
| COPY --from=builder /app/niyam . | |
| # Hugging Face Spaces often expose port 7860 by default for Gradio/Streamlit, still exposing... | |
| EXPOSE 7860 | |
| CMD ["./niyam"] |