⚠️ Deprecated⚠️ This method is not usefull anymore as Playwright v1.17+ now supports Raspberry PI - see 1.17 release notes
This dockerfile demonstrate how to install playwright-python on raspberry pi 4.
I tested it only on ubuntu 20.04 64bits on rpi4. It may work on other raspberries.
# Build the image
docker build --pull --rm -t playwrightrpi4:latest "."
# Run it
docker run --rm -it playwrightrpi4:latest
# it should show playwright webpage title:
# Fast and reliable end-to-end testing for modern web apps | Playwright
- You need to download playwright package manually as shown in the dockerfile because there is no version for arm and if you use the
pip install playwright
command, it will download you an old version. - You need to install chromium. It may be available as a package depending on your distribution. On ubuntu 20.04, use
sudo apt-get install chromium-browser
. It will be installed as a snap. - You need to install node.
sudo apt-get install nodejs
- Follow the commands in dockerfile to replace the chrome and node binaries with the one you installed.