Spaces:
Running
Running
Download Dockerfile from Soumik-404/parseFlow: direct link, hf CLI and curl.
- Browser
- Download file 973 Bytes
-
https://huggingface.co/spaces/Soumik-404/parseFlow/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Soumik-404/parseFlow/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Soumik-404/parseFlow/resolve/main/Dockerfile
973 Bytes
| # ---- build stage ---- | |
| FROM golang:1.26-alpine AS build | |
| WORKDIR /src | |
| # Cache dependencies first. | |
| COPY go.mod go.sum ./ | |
| RUN go mod download | |
| COPY . . | |
| # Everything (templates, static assets, migrations) is embedded at compile | |
| # time, so the output is a single self-contained static binary. | |
| RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/markitdown ./cmd/server | |
| RUN mkdir /data | |
| # ---- runtime stage: distroless, no shell, non-root, ~15MB image ---- | |
| FROM gcr.io/distroless/static-debian12:nonroot | |
| COPY --from=build /out/markitdown /markitdown | |
| COPY --from=build --chown=nonroot:nonroot /data /data | |
| # Hugging Face Spaces (Docker SDK) requires the container to listen on 7860. | |
| # These are defaults only: HF Space secrets and `docker run --env-file .env` | |
| # override them (local .env uses PORT=8909). | |
| ENV PORT=7860 | |
| ENV DATABASE_URL=file:/data/markitdown.db?_busy_timeout=5000&_foreign_keys=on | |
| EXPOSE 7860 | |
| USER nonroot:nonroot | |
| ENTRYPOINT ["/markitdown"] | |