Spaces:
Sleeping
Sleeping
Download Dockerfile from sameernotes/chat: direct link, hf CLI and curl.
- Browser
- Download file 757 Bytes
-
https://huggingface.co/spaces/sameernotes/chat/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sameernotes/chat/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sameernotes/chat/resolve/main/Dockerfile
757 Bytes
| # Dockerfile | |
| # Use an official Node.js runtime as the base image | |
| FROM node:22.1.0 | |
| WORKDIR /usr/src/app | |
| # Copy only package files first for better layer caching | |
| # Use 1000:1000 for non-root user/group typically used in these images | |
| COPY --chown=1000:1000 package.json package-lock.json ./ | |
| # Install production dependencies only | |
| RUN npm install --production --ignore-scripts | |
| # Copy the rest of the application files | |
| # This includes app.js, public/index.html, data/users.json (initially empty if not existing) | |
| COPY --chown=1000:1000 . . | |
| # Expose the port Hugging Face expects (usually 7860) | |
| EXPOSE 7860 | |
| # Ensure the app runs as non-root user (good practice) | |
| USER 1000 | |
| # Start the application using the start script from package.json | |
| CMD ["npm", "start"] |