A simple docker image to use playwright locally on all OSs
When launching it with interactive tty and volumes option you can use a bash to run playwright command from package.json using docker to run it locally.
From this repo root folder
docker buildx build --tag=playwright .You can use this docker with a locally built image or a remote one
From the project you want to test root folder
docker run -it -v ./:/app -v ./docker_node_modules:/app/node_modules -v ./docker_ms-playwright:/ms-playwright playwrightFrom the project you want to test root folder
docker run -it -v ./:/app -v ./docker_node_modules:/app/node_modules -v ./docker_ms-playwright:/ms-playwright skillbillsrl/playwrightJust the first time in a project
npm iAll others time to test
npm run testwhere test is your package.json test command.
NB: If your test use a built version eg. dist folder, I suggest to build outside docker