Spaces:
Paused
Paused
Download Dockerfile from abcd118q/playwright: direct link, hf CLI and curl.
- Browser
- Download file 756 Bytes
-
https://huggingface.co/spaces/abcd118q/playwright/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/abcd118q/playwright/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/abcd118q/playwright/resolve/main/Dockerfile
756 Bytes
| # Use the official Playwright image | |
| FROM mcr.microsoft.com/playwright:v1.60.0-jammy | |
| # Switch to root to fix the user conflict | |
| USER root | |
| # Rename the existing 'pwuser' (UID 1000) to 'user' and update its home directory | |
| RUN usermod -l user pwuser && \ | |
| usermod -d /home/user -m user && \ | |
| groupmod -n user pwuser | |
| # Set permissions for the app directory | |
| WORKDIR /home/user/app | |
| RUN chown -R user:user /home/user/app | |
| # Switch to the renamed user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Install Chromium (Playwright needs this) | |
| RUN npx playwright install chromium | |
| # Hugging Face default port | |
| EXPOSE 7860 | |
| # Start the server | |
| CMD ["npx", "playwright", "run-server", "--port", "7860", "--host", "0.0.0.0", "--path", "/ws"] |