Add Playwright Chromium system dependencies to base image#26
Merged
Conversation
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.
Contributor
Author
|
What do you think, @megheaiulian? |
Contributor
|
I think its great! Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npx playwright install-deps chromium --dry-runon 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 runningsudo npx playwright install-depsmanually 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 installblock inimages/base/Dockerfile. This covers Chromium only — Firefox and WebKit deps can be added later if needed. Browser binaries themselves are still installed per-project vianpx playwright install.What this does NOT include