Download Dockerfile from stopcasl/stopca: direct link, hf CLI and curl.
- Browser
- Download file 691 Bytes
-
https://huggingface.co/spaces/stopcasl/stopca/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/stopcasl/stopca/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/stopcasl/stopca/resolve/main/Dockerfile
691 Bytes
| # Step 1: Use an official Node.js runtime as the base image | |
| FROM node:20-slim | |
| # Install git so we can clone the repo | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # --- THE FIX IS HERE --- | |
| # Mount the Hugging Face secret safely during the build layer | |
| RUN --mount=type=secret,id=GIT_REPO_URL,mode=0444,required=true \ | |
| git clone $(cat /run/secrets/GIT_REPO_URL) . | |
| # Install project dependencies | |
| # Replace the old npm ci line with this: | |
| RUN npm install --omit=dev | |
| # Expose the port your app runs on | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| # Start the application | |
| CMD ["npm", "start"] |