Spaces:
Paused
Paused
File size: 758 Bytes
518a031 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Use the official Playwright image which includes all dependencies and browsers
FROM mcr.microsoft.com/playwright:v1.49.1-jammy
# Playwright image already has a user with UID 1000 (usually 'pwuser')
# We just need to ensure the app directory belongs to UID 1000
WORKDIR /app
RUN chown -R 1000:1000 /app
# Switch to the user with UID 1000
USER 1000
ENV HOME=/home/pwuser \
PATH=/home/pwuser/.local/bin:$PATH
# Playwright image already has browsers in a global location,
# so we don't need to install them again or set custom paths.
COPY --chown=1000:1000 package*.json ./
RUN npm install
# Copy application files
COPY --chown=1000:1000 . .
# Hugging Face requirement
ENV PORT=7860
EXPOSE 7860
CMD ["node", "server.js"]
|