Skip to content

build(docker): add chromium runtime libraries for playwright - #352

Closed
LouiFi wants to merge 2 commits into
chriswritescode-dev:mainfrom
LouiFi:feat/docker-playwright-libs
Closed

LouiFi wants to merge 2 commits into
chriswritescode-dev:mainfrom
LouiFi:feat/docker-playwright-libs

Conversation

@LouiFi

@LouiFi LouiFi commented Sep 14, 2026

Copy link
Copy Markdown

What

Adds the 18 system libraries Playwright's Chromium (1.63) needs at runtime to the runner image stage, so e2e is ready out of the box in every OCM deployment.

Why

OpenCode agents run Playwright e2e suites (bun run e2e) inside the container. Without root/sudo in the image, each fresh container needed a userspace bootstrap that downloads and extracts those .debs. Baking the libraries in makes the bootstrap a no-op on up-to-date images.

Details

  • New RUN apt-get install --no-install-recommends layer in the runner stage (after the microsandbox install, before the ENV block), with apt lists cleaned.
  • 18 packages, the exact set measured from a clean ldd of the Playwright chromium headless shell on Debian trixie (the image base is Debian trixie):
    libasound2t64 libatk-bridge2.0-0t64 libatk1.0-0t64 libatspi2.0-0t64 libcups2t64 libdbus-1-3 libdrm2 libgbm1 libnspr4 libnss3 libxcomposite1 libxdamage1 libxfixes3 libxi6 libxkbcommon0 libxrandr2 libavahi-client3 libavahi-common3
  • Version bump 0.17.5 -> 0.17.6.

Verified

  • Full e2e suite (7 projects + 1) green in an OCM container of the generation this image replaces, after the equivalent userspace install of the same 18 packages.
  • Image build is validated by the docker-build workflow on release (amd64 + arm64).

Note: the Chromium browser itself is intentionally not baked in (kept the image lean); a fresh container downloads it once via the repo's e2e:setup script.

Summary by CodeRabbit

  • Improvements

    • Improved deployment support for Chromium-based browser testing.
  • Chores

    • Updated the application release version to 0.17.6.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 65f961b8-5f77-4fca-99a0-14a69fe2b17e

📥 Commits

Reviewing files that changed from the base of the PR and between b21c80c and ab535ae.

📒 Files selected for processing (2)
  • Dockerfile
  • package.json

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The runner image now installs Playwright Chromium runtime libraries. The package version changes from 0.17.5 to 0.17.6.

Changes

Container and Release

Layer / File(s) Summary
Chromium runtime dependencies
Dockerfile
The runner stage installs Chromium runtime libraries with --no-install-recommends and removes the apt lists.
Package version update
package.json
The package version changes from 0.17.5 to 0.17.6.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: chriswritescode-dev

Merge Risk: ⚪ Minimal · up to ab535

The PR adds the declared Chromium runtime libraries and updates the package version consistently; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, motivation, package list, version bump, and verification steps. It does not use the required Summary, Type of Change, and Checklist sections or provide their requi… Add the required Summary section, select the applicable Type of Change checkbox, and complete the Checklist items for style, TypeScript types, tests and coverage, lint, and typecheck.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding Chromium runtime libraries for Playwright in Docker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, motivation, package list, version bump, and verification steps. It does not use the required Summary, Type of Change, and Checklist sections or provide their required checkbox information.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chriswritescode-dev

Copy link
Copy Markdown
Owner

Superseded by #357, which fixes the same problem differently: the Chromium runtime libraries are resolved by Playwright itself (playwright install-deps chromium) for a pinned PLAYWRIGHT_VERSION, rather than a hand-maintained package list. That closes the two packages this list did not cover — libcairo2 and libpango-1.0-0, which are linked by the full Chromium binary but are not reachable from any of the 18. #357 also bumps Playwright to 1.63.0 and refreshes the image's other pinned tool versions.

The ldd measurement here is what made the gap visible, so thanks for that.

Closing in favour of #357.

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