This patch introduces the following commands:
- `npx playwright docker build` that builds a VRT docker image
locally that is based off the `mcr.microsoft.com/playwright:jammy`
- `npx playwright docker start` that launches a docker container with
browsers.
- `npx playwright docker stop` that stops given docker container.
- `npx playwright docker test` that runs all the tests inside a
launched docker container.
This patch prints a friendly instructions in case Docker image version
mismatches Playwright version and there are missing browser
dependencies.
With this patch, Playwright will yield the following error:
```
root@f0774d2b2097:~# node a.mjs
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
browserType.launch:
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ This is most likely due to docker image version not matching Playwright version: ║
║ - Playwright: 1.22.0 ║
║ - Docker: 1.21.0 ║
║ ║
║ Either: ║
║ - (recommended) use docker image "mcr.microsoft.com/playwright:v1.22.0-focal" ║
║ - (alternative 1) run the following command inside docker to install missing dependencies: ║
║ ║
║ npx playwright install-deps ║
║ ║
║ - (alternative 2) use Aptitude inside docker: ║
║ ║
║ apt-get install libgbm1 ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
at file:///root/a.mjs:3:10 {
name: 'Error'
}```
Fixes#12796
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
This patch:
- moves docker publishing to main repo
- extracts all the logic from the GHA YML file to Bash
- starts using the script in both `publish_canary.yml` and
`publish_release.yml`
Fixes#10351
This patch:
- removes the Visual Regression bits from the images. These will
probably be added back when it's ready for the prime time.
* removes VNC && noVNC
* removes Playwright Agent
- cleans up apt caches
This drops image size from 2.03GB to 1.91GB.
Turns out Azure Pipelines is doing a few modifications to the base
container. One of the important modification is that they add a new
user to the container that has a passwordless sudo permissions. This
user is used later on to run all the pipeline steps.
This patch makes sure our shared registry inside the docker containers
is accessible to all the users.
Fixes#5635
Instead of symlinking pwuser's registry to root's registry, we now
use the `PLAYWRIGHT_BROWSERS_PATH` variable to define a single
browser registry across the docker image, accessible for all
users.
Fixes#4485