Spaces:
Sleeping
Sleeping
Download Dockerfile from Sarvesh3529/Matrix-backend-node.js: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/spaces/Sarvesh3529/Matrix-backend-node.js/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sarvesh3529/Matrix-backend-node.js/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sarvesh3529/Matrix-backend-node.js/resolve/main/Dockerfile
488 Bytes
| FROM node:20-alpine | |
| # Set up the working directory inside the pre-existing node user's home | |
| WORKDIR /home/node/app | |
| # Copy dependency configs and adjust ownership to the 'node' user | |
| COPY --chown=node:node package*.json ./ | |
| RUN npm install | |
| # Copy the rest of your server code | |
| COPY --chown=node:node . . | |
| # Switch to the non-root node user for Hugging Face security | |
| USER node | |
| # Expose the mandatory Hugging Face port | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["node", "server.js"] |