Skip to content

fix(docker): Pre-install Playwright Chromium browsers for automated t…#745

Open
Shironex wants to merge 3 commits intov0.14.0rcfrom
fix/docker-playwright-missing-browsers
Open

fix(docker): Pre-install Playwright Chromium browsers for automated t…#745
Shironex wants to merge 3 commits intov0.14.0rcfrom
fix/docker-playwright-missing-browsers

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Feb 2, 2026

Fixes #725

AI agents in automated testing mode require Playwright to verify implementations, but Docker containers had only system dependencies installed, not browser binaries. This caused verification failures with permissions errors.

Changes:

  • Install Playwright Chromium in Dockerfile (~300MB increase)
  • Update docker-compose.override.yml.example with clearer Playwright documentation
  • Add "Playwright for Automated Testing" section to README
  • Document optional volume mount for persisting browsers across rebuilds

Browsers are now pre-installed and work out of the box for Docker users.

Summary by CodeRabbit

  • New Features

    • Chromium browser pre-installed in the container image for immediate Playwright automated testing (~300MB increase).
    • Verification steps added to confirm browser installation during image startup.
  • Documentation

    • New Playwright E2E testing section with no-setup checks, manual update/reinstall commands, and guidance for persisting browser caches.
    • Sample docker-compose.override snippet and notes warning that an empty cache volume will override pre-installed browsers and how to reset.

…esting

Fixes #725

AI agents in automated testing mode require Playwright to verify implementations,
but Docker containers had only system dependencies installed, not browser binaries.
This caused verification failures with permissions errors.

Changes:
- Install Playwright Chromium in Dockerfile (~300MB increase)
- Update docker-compose.override.yml.example with clearer Playwright documentation
- Add "Playwright for Automated Testing" section to README
- Document optional volume mount for persisting browsers across rebuilds

Browsers are now pre-installed and work out of the box for Docker users.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

Pre-installs Playwright Chromium in the Docker server image, updates README with Playwright E2E testing and cache guidance, and clarifies docker-compose.override.yml.example with an optional Playwright browser cache volume and manual update instructions.

Changes

Cohort / File(s) Summary
Docker Image Setup
Dockerfile
Adds Playwright Chromium install steps (runs as automaker then reverts to root), sets PATH entries for /home/automaker/.local/bin, emits verification output and lists Playwright cache; ensures browsers present in built image.
Documentation
README.md
Adds End-to-End (Playwright) testing section, documents pre-installed Chromium, verifies no‑setup testing, provides guidance for persisting Playwright cache and reinstalling browsers when using a mounted volume.
Docker Composition
docker-compose.override.yml.example
Clarifies "Playwright Browser Cache (Optional)" section, shows volume snippet to persist /home/automaker/.cache/ms-playwright, and documents manual update/reinstall commands and caveats about empty volumes overriding preinstalled browsers.

Sequence Diagram(s)

(omitted — changes are build and documentation focused and do not introduce a new multi-component runtime flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Documentation, Ready-To-Merge

Poem

🐇 I hopped through Dockerfiles with nimble paws,
Poured Chromium in so tests obey the laws.
A cache for browsers, snug in a named volume bed,
Agents now click happily, no errors to dread.
Hooray — carrots for CI and cocoa for the devs! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: pre-installing Playwright Chromium in Docker for automated testing, matching the core objective of fixing the bug.
Linked Issues check ✅ Passed All coding requirements from issue #725 are met: Dockerfile installs Playwright Chromium (primary fix), README documents Playwright for automated testing, docker-compose.override.yml.example clarifies cache persistence workflow.
Out of Scope Changes check ✅ Passed All changes directly address issue #725: Dockerfile modification for browser installation, README documentation for Playwright testing, and docker-compose example clarification for cache persistence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/docker-playwright-missing-browsers

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 and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses issue #725 by pre-installing Playwright Chromium in the Docker image, enabling automated testing without requiring additional setup. It also includes documentation updates and configuration examples to guide users on how to persist the browser cache across container rebuilds.

Highlights

  • Playwright Installation: Playwright Chromium is now pre-installed in the Docker image to support automated testing, resolving issues with missing browser binaries and permission errors.
  • Documentation Updates: The README.md has been updated with a new section on "Playwright for Automated Testing," including instructions for persisting browsers across rebuilds.
  • Configuration Example: The docker-compose.override.yml.example file has been updated with clearer documentation on Playwright and instructions for persisting the browser cache.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Shironex Shironex self-assigned this Feb 2, 2026
@Shironex Shironex added the Bug Something isn't working label Feb 2, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request pre-installs Playwright Chromium browsers in the Docker image to enable automated testing out of the box. The changes include updating the Dockerfile to install the browser, and modifying the README and docker-compose example file to document this feature and the optional persistence of the browser cache. My review focuses on improving the Docker layer caching and clarifying the documentation around using a persistent volume for the Playwright cache to avoid user confusion.

- Clean up npx cache after Playwright installation to reduce image size
- Clarify README: volume mounts persist cache across container lifecycles,
  not image rebuilds
- Add first-use warning: empty volume overrides pre-installed browsers,
  users must re-install with docker exec command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@docker-compose.override.yml.example`:
- Around line 24-30: Update the manual Playwright update instruction so it runs
inside the automaker-server container as the automaker user with working
directory /app (so Playwright installs to /home/automaker/.cache/ms-playwright
instead of root); specifically replace the current example command that runs as
root with one that executes the install command in the automaker-server
container using user "automaker" and working directory "/app".

In `@Dockerfile`:
- Around line 122-126: The Playwright install RUN (the command "npx playwright
install chromium") must be moved so it runs after the COPY --from=server-builder
/app/node_modules ./node_modules step; update the Dockerfile to remove the early
RUN and add a new RUN after the node_modules copy that invokes the locally
installed playwright (e.g., use ./node_modules/.bin/playwright install chromium
or npx --no-install playwright install chromium) so the pinned version from
node_modules/package-lock.json is used and no registry fetch occurs.

In `@README.md`:
- Line 347: Replace the bold subsection title "**Optional: Persist browsers
across container rebuilds**" with a proper Markdown heading (e.g., "###
Optional: Persist browsers across container rebuilds" or another appropriate
heading level) so it stops being flagged by markdownlint MD036; locate the exact
bold text in README.md and change it to the chosen heading syntax.
- Around line 362-366: Update the README's manual browser update command so it
runs as the automaker user and from /app: change the documented docker exec
invocation that currently runs npx playwright install chromium in the container
(automaker-server) to include running as user "automaker" and setting the
working directory to "/app" (i.e. add the equivalent of the docker exec flags to
set user and workdir) so that the Playwright browser cache is written to the
automaker user's cache directory rather than root.

- Move Playwright install after node_modules copy to use pinned version
- Use local playwright binary instead of npx to avoid registry fetch
- Add --user automaker -w /app flags to docker exec commands
- Change bold text to proper heading in README (MD036 lint fix)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex added the Testers-Requested Request for others to test an enhancement or bug fix/etc. label Feb 2, 2026
@JasonBroderick
Copy link

Tested this PR - found an issue and submitted a fix

I tested this PR on WSL2 Ubuntu and found that the Playwright install step fails during Docker build:

#63 [server server 16/20] RUN ./node_modules/.bin/playwright install chromium
#63 0.248 /bin/sh: 1: ./node_modules/.bin/playwright: not found

Root cause: The server-builder stage only copies apps/server/package.json, so playwright (which is only in apps/ui/package.json devDependencies) isn't available in the server's node_modules.

Fix: I've submitted #751 which adds @playwright/test to the server's devDependencies. After this fix, the build works correctly and Playwright verification runs successfully in Automaker.

Feel free to:

Happy to help however is most useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Testers-Requested Request for others to test an enhancement or bug fix/etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants