Spaces:
Runtime error
Runtime error
Download Dockerfile from ZENLLC/gemini-image-to-code: direct link, hf CLI and curl.
- Browser
- Download file 795 Bytes
-
https://huggingface.co/spaces/ZENLLC/gemini-image-to-code/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ZENLLC/gemini-image-to-code/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ZENLLC/gemini-image-to-code/resolve/main/Dockerfile
795 Bytes
| FROM node:18-alpine | |
| WORKDIR /app | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN deluser --remove-home node \ | |
| && addgroup -S user -g 1000 \ | |
| && adduser -S -G user -u 1000 user \ | |
| && chown -R user:user /app | |
| # Copy package files | |
| COPY package*.json ./ | |
| # Install dependencies with legacy peer deps flag | |
| RUN chown -R user:user /app && \ | |
| npm install --legacy-peer-deps | |
| # Switch to user after npm install | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Copy rest of the application with correct ownership | |
| COPY --chown=user . . | |
| # Build the Next.js application | |
| RUN npm run build | |
| # Expose the port the app runs on (Hugging Face Spaces requires port 7860) | |
| EXPOSE 7860 | |
| # Start the application on port 7860 | |
| CMD ["npm", "run", "start", "--", "-p", "7860"] |