Skip to content

Add Playwright Chromium system dependencies to base image#26

Merged
megheaiulian merged 1 commit into
mainfrom
feat/playwright-chromium-deps
Mar 21, 2026
Merged

Add Playwright Chromium system dependencies to base image#26
megheaiulian merged 1 commit into
mainfrom
feat/playwright-chromium-deps

Conversation

@cristinecula

Copy link
Copy Markdown
Contributor

Summary

  • Add the OS-level shared libraries required by Playwright's Chromium browser to the base Docker image
  • Package list sourced from npx playwright install-deps chromium --dry-run on Ubuntu Noble (24.04)

Problem

npm test (via @web/test-runner-playwright) fails after every Coder workspace rebuild because the Chromium shared libraries (libglib-2.0.so.0, libnss3.so, libgtk-3.so.0, etc.) are missing from the base image. Currently the only workaround is running sudo npx playwright install-deps manually in each workspace, which is slow and doesn't persist across rebuilds.

What this does

Adds 33 packages (fonts + X11/ATK/NSS/GBM libs) to the existing apt-get install block in images/base/Dockerfile. This covers Chromium only — Firefox and WebKit deps can be added later if needed. Browser binaries themselves are still installed per-project via npx playwright install.

What this does NOT include

  • Browser binaries — those are downloaded per-project
  • Firefox/WebKit deps — only Chromium is covered to keep the image lean

npm test (via @web/test-runner-playwright) fails after every Coder
workspace rebuild because the Chromium shared libraries are missing
from the base image. This adds the OS packages that Playwright's
Chromium needs so tests work out of the box.

Package list from: npx playwright install-deps chromium --dry-run
(Ubuntu Noble 24.04). Only Chromium deps are included; Firefox and
WebKit deps can be added later if needed.
@cristinecula

Copy link
Copy Markdown
Contributor Author

What do you think, @megheaiulian?

@cristinecula cristinecula self-assigned this Mar 19, 2026
@cristinecula cristinecula marked this pull request as ready for review March 19, 2026 13:07
@megheaiulian

Copy link
Copy Markdown
Contributor

I think its great! Thank you!

@megheaiulian megheaiulian merged commit acd3f5e into main Mar 21, 2026
3 checks passed
@megheaiulian megheaiulian deleted the feat/playwright-chromium-deps branch March 21, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants