Download Dockerfile from bardd/node-pt: direct link, hf CLI and curl.
- Browser
- Download file 637 Bytes
-
https://huggingface.co/spaces/bardd/node-pt/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/bardd/node-pt/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/bardd/node-pt/resolve/main/Dockerfile
637 Bytes
| FROM node:20-alpine | |
| # Install build dependencies | |
| RUN apk add --no-cache make gcc g++ python3 | |
| # Create app directory | |
| WORKDIR /app | |
| # Copy all application files | |
| COPY . . | |
| # Remove existing node_modules (if any) | |
| RUN rm -rf node_modules | |
| # Install dependencies | |
| RUN npm ci | |
| # Build the application | |
| RUN npm run build | |
| # Rebuild bcrypt (if necessary) | |
| RUN npm rebuild bcrypt --build-from-source | |
| # Create the dist directory and set permissions | |
| RUN mkdir -p /app/dist && chown -R node:node /app | |
| # Switch to non-root user | |
| USER node | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Command to run the application | |
| CMD ["npm", "run", "start:dev"] |