Spaces:
Running
Running
Download Dockerfile from hivetrace/GuardRateLeaderboard: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/spaces/hivetrace/GuardRateLeaderboard/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hivetrace/GuardRateLeaderboard/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hivetrace/GuardRateLeaderboard/resolve/main/Dockerfile
831 Bytes
| # syntax=docker/dockerfile:1 | |
| FROM node:24-alpine AS builder | |
| WORKDIR /app | |
| ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 | |
| COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | |
| RUN corepack enable && corepack prepare pnpm@11.9.0 --activate && pnpm --version | |
| RUN --mount=type=cache,target=/root/.local/share/pnpm/store \ | |
| pnpm install --frozen-lockfile | |
| COPY . . | |
| RUN pnpm run build | |
| RUN find build -type f -name '*.map' -delete | |
| FROM node:24-alpine | |
| WORKDIR /app | |
| ENV NODE_ENV=production \ | |
| HOST=0.0.0.0 \ | |
| PORT=5173 | |
| RUN apk add --no-cache curl | |
| COPY --from=builder --chown=node:node /app/package.json ./ | |
| COPY --from=builder --chown=node:node /app/build ./build | |
| EXPOSE 5173 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ | |
| CMD curl -f http://localhost:5173/ || exit 1 | |
| USER node | |
| CMD ["node", "build"] | |