Download Dockerfile from Znfeoqm/qr_code: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/Znfeoqm/qr_code/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Znfeoqm/qr_code/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Znfeoqm/qr_code/resolve/main/Dockerfile
509 Bytes
| # Stage 1: Build the React application | |
| FROM node:18-alpine as builder | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| RUN npm run build | |
| # Stage 2: Serve the application with Nginx | |
| FROM nginx:alpine | |
| # Copy the built React app from the builder stage | |
| COPY --from=builder /app/dist /usr/share/nginx/html | |
| # Copy the custom Nginx configuration file | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| # EXPOSE port 7860 to match Hugging Face Spaces' expectation | |
| EXPOSE 7860 | |
| CMD ["nginx", "-g", "daemon off;"] | |