Skip to content

fix(ralphex-fe): use system Chromium to eliminate Playwright version mismatch - #70

Merged
gatezh merged 4 commits into
masterfrom
fix-ralphex-playwright
Apr 2, 2026
Merged

gatezh merged 4 commits into
masterfrom
fix-ralphex-playwright

Conversation

@gatezh

@gatezh gatezh commented Apr 1, 2026

Copy link
Copy Markdown
Owner

What

Replace Playwright-managed browser downloads with Debian's system Chromium, using --executable-path to bypass Playwright's version-coupled browser management.

Why

The image cached Chromium for playwright@1.58.2 (revision 1208) at build time, but @playwright/mcp@latest depends on playwright-core@1.60.0-alpha (revision 1217) at runtime — causing an 8+ minute browser re-download on every container start. This is structurally unfixable with version pinning because @playwright/mcp uses alpha Playwright builds that change nearly every release (43 of 63 releases used different versions).

Changes

  • Dockerfile: Remove ARG PLAYWRIGHT_VERSION and npx playwright install steps; add chromium + fonts-freefont-ttf to the apt-get block; set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 and PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
  • init-docker.sh: Expand MCP config patch from ARM64-only to all architectures; add --executable-path /usr/bin/chromium and --no-sandbox flags
  • CI workflows: Update verify steps to check system Chromium; fix chromium-browser → chromium (correct binary name for Debian Trixie)
  • Rules: Update .claude/rules/dockerfile.md to document the system Chromium approach for both Debian and Alpine

Notes

  • --executable-path is officially supported by @playwright/mcp (source)
  • System Chromium from Debian Trixie tracks recent stable releases, close enough to Playwright's alpha targets for MCP usage (browsing, clicking, extracting)
  • Implementation plan archived at docs/plans/2026-04-01-fix-playwright-chromium-mismatch.md

gatezh and others added 4 commits April 1, 2026 14:53
…mium

- Install chromium + fonts-freefont-ttf via apt instead of npx playwright install
- Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 and PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH
- Expand init-docker.sh MCP patch to all architectures with --executable-path and --no-sandbox
- Fix CI verify steps: chromium-browser → chromium (Debian Trixie binary name)
- Update dockerfile.md to document system Chromium approach

Eliminates 8+ minute browser re-downloads caused by @playwright/mcp@latest
depending on alpha playwright-core versions that differ from build-time cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The chromium Debian package pulls in systemd, which creates
systemd-network with GID 998. Use groupadd -f to exit successfully
when the GID is already taken.
systemd (pulled by chromium) claims both GID 998 and 999.
Use groupadd -f for both ping and docker groups.
@gatezh
gatezh merged commit 81dcf20 into master Apr 2, 2026
8 checks passed
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.

1 participant