Skip to content

playwright-tools

Playwright CI image: node-tools + Chromium runtime libraries + a baked chromium-headless-shell

Release v0.1.7, 2026-11-17. Built on node-tools. Source: phpboyscout/images/playwright-tools.

Pin it

image: registry.gitlab.com/phpboyscout/images/playwright-tools:v0.1.7

Pin the full version. Each release also moves its minor tag and latest, which change under you.

Variant Tags
default v0.1.7, v0.1

About this image

The browser image for the frontend track's e2e job.

registry.gitlab.com/phpboyscout/images/playwright-tools:vX.Y.Z

node-tools plus exactly two things: Chromium's runtime libraries, and a baked chromium-headless-shell. Nothing else.

Serves the playwright job in svelte-test, via its playwright_image input.

Why it exists

svelte-test's e2e job ran npx playwright install --with-deps before the tests. That can never work on Wolfi. Playwright has no apk path: it detects an unsupported OS, falls back to ubuntu24.04-x64 and shells out to apt-get, which is not there.

BEWARE: your OS is not officially supported by Playwright;
installing dependencies for ubuntu24.04-x64 as a fallback.
sh: apt-get: not found
Error: Installation process exited with code: 127

The error it surfaces first is su: must be suid to work properly, which reads as "the image is non-root" and is a red herring — running as root only moves the failure to the line above.

So the image provides the libraries, and the component stops asking Playwright to.

The invisible half

allow_failure: true meant the 12-second failure reported as a green pipeline. In krites:

when ref result
2026-08-18 17:56 main success
2026-08-20 00:56 !177 failed
2026-08-20 01:52 main failed
2026-08-20 20:22 !180 failed

Three runs, two on main, every one a passing pipeline. Both consumers with enable_e2e: true had been shipping without e2e coverage and without any signal saying so.

Why a separate image

Baking the browser into node-tools takes it from ~117 MB to roughly 780 MB — a 6.5x inflation of the image that serves svelte-build, svelte-lint and vitest across the estate, to serve one opt-in job that two projects enable. node-tools at 112 MB was the headline of the 0074 split, the largest proportional saving of any track at −89%; baking the browser in spends all of it.

The estate already has the pattern: tofu-security runs each scanner from its own image rather than accumulating them into one.

size
node-tools baseline 321 MB
+ Chromium runtime libraries (27 apk packages) 711 MB (+390)
chromium-headless-shell + ffmpeg 267 MB
full chromium + shell + ffmpeg 655 MB
Wolfi's own chromium package +1,080 MB

(du -sm, measured on the built image.)

Wolfi's chromium costs a gigabyte, and the reason is not obvious

Only ~380 MB of it is the browser. The rest is a desktop and GPU stack — Qt6, GTK4, systemd, video codecs, two Pythons, and 192 MB of LLVM so Mesa's software rasteriser can JIT-compile shaders. Headless CI needs none of it.

The headless shell, not full Chromium

267 MB against 655 MB, and this is pure CI that will never need a head.

"Headless CI" and "the chromium-headless-shell binary" are not the same choice, which is why this needed checking rather than asserting. Playwright's chromium project historically resolved to the full browser, and both consumers use the default channel:

projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }]

Modern Playwright selects the headless shell automatically when running headless on that config, so neither consumer needs a config change. That is a version-dependent behaviour, so the Dockerfile asserts it on every build: it installs @playwright/test at the pinned version into a temp directory, runs a one-test suite with exactly that projects config, and tears it down inside the same layer. If a future Playwright stops resolving to the shell, the image build fails rather than a consumer's e2e job.

Three Wolfi package-name traps

Each of these looks like "no such package":

you want it is called
nss, nspr libnss, libnspr — a plain nss exists and is not the one carrying libnspr4.so
atk libatk-1.0 and libatk-bridge-2.0 — versioned in the package name, so neither atk nor libatk resolves
font-dejavu ttf-dejavu

The package list was arrived at by walking the missing-library chain to a successful browser launch, not by copying Playwright's documented Ubuntu list.

mesa is not narrowed, deliberately

libgbm.so.1 is genuinely required — without mesa the shell fails to link. mesa-gbm looks like the narrow answer and is not: it still pulls libLLVM through mesa-libgallium, saves only 40 MB of 390, and introduces a libudev.so.1 dependency the full package satisfies. Measured, not assumed.

The browser is pinned, and the consumer cannot re-download it

PLAYWRIGHT_BROWSERS_PATH points at /opt/playwright-browsers, outside the checkout, so every job finds the same copy. PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 stops a consumer's own npm ci quietly fetching a second copy into $CI_PROJECT_DIR — which would be invisible, slow, and would defeat the point of baking it.

The browser version and the consumer's @playwright/test version must agree: Playwright refuses to drive a browser build it does not recognise. The image's PLAYWRIGHT_VERSION is therefore the pin, and a consumer upgrading past it gets a clear error rather than a subtle one.

It stays non-root

Installation needs root; the image drops back to ci-base's ci user (uid 1000) at the end, inheriting node-tools. The browser is installed root-owned and made world-readable, and the build asserts that rather than assuming it — a permission slip would otherwise surface at job time as a confusing "browser not found".

The non-root user is not why --with-deps failed. Running as root does not fix it, and would have traded away a deliberate 0074 decision to buy nothing.

The scan is split by who can fix it

Job Scope Gate
scan:os OS/apk packages — the base, node-tools, and the 27 libraries added here hard
scan:tools Node's bundled dependencies and the baked Chromium build advisory

Measured when written, the 27 Chromium runtime packages introduced zero new OS findings over the node-tools baseline.

Consumer dependencies are deliberately not scanned here — they live in the consumer's lockfile, and svelte-security already scans them there.

Not included

Firefox and WebKit. Chromium only until something needs otherwise; each adds a comparable download.

Design record

cicd spec 0076, following 0074.

Everything installed

Contents not yet published. This image's releases do not carry an SBOM yet. Until they do, the README above describes what it adds, and the Dockerfile is the full record.