Download Dockerfile from PVPPRO/Slayers: direct link, hf CLI and curl.
- Browser
- Download file 717 Bytes
-
https://huggingface.co/spaces/PVPPRO/Slayers/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/PVPPRO/Slayers/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/PVPPRO/Slayers/resolve/main/Dockerfile
717 Bytes
| # 1. Use Node.js 20 | |
| FROM node:20-alpine | |
| # 2. Install pnpm globally | |
| RUN npm install -g pnpm | |
| # 3. Set the working directory | |
| WORKDIR /app | |
| # 4. Copy configuration files | |
| COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./ | |
| COPY tsconfig.json tsconfig.base.json ./ | |
| # 5. Copy the entire project | |
| COPY . . | |
| # 6. Install dependencies with platform-specific fix | |
| # This tells pnpm to specifically fetch the Linux binaries needed for Rollup/Vite | |
| RUN pnpm config set supported-architectures ["linux-x64-musl"] | |
| RUN pnpm install | |
| # 7. Build the libraries and then the apps | |
| RUN pnpm run build | |
| # 8. Hugging Face port configuration | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 9. Start the multiplayer server | |
| CMD ["pnpm", "run", "start"] |