Default PLAYWRIGHT_BROWSER to chromium in the image

The Dockerfile installs Chromium via `playwright install chromium`, but
Playwright MCP defaults to Chrome (the branded Google build) when no
browser is specified. On a fresh container the launch fails and the
agent falls back to installing Chrome at runtime. Baking the env var
into the image keeps installed browser and default in sync.
This commit is contained in:
EugeneTes
2026-09-08 12:45:19 +00:00
parent 311bdb2eed
commit 4f2248e24c

View File

@@ -23,10 +23,13 @@ COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Expose `pi` (and any other project-local bin) on PATH so `docker exec` finds it. # Expose `pi` (and any other project-local bin) on PATH so `docker exec` finds it.
# PLAYWRIGHT_BROWSER=chromium matches the browser installed above — Playwright MCP
# otherwise defaults to Chrome (the branded Google build), which isn't in the image.
ENV PATH="/app/node_modules/.bin:${PATH}" \ ENV PATH="/app/node_modules/.bin:${PATH}" \
NODE_ENV=production \ NODE_ENV=production \
WORKSPACE_DIR=/workspace \ WORKSPACE_DIR=/workspace \
PI_CODING_AGENT_DIR=/pi-agent PI_CODING_AGENT_DIR=/pi-agent \
PLAYWRIGHT_BROWSER=chromium
VOLUME ["/workspace", "/pi-agent"] VOLUME ["/workspace", "/pi-agent"]
# The node base image already sets ENTRYPOINT ["docker-entrypoint.sh"], and we replaced that # The node base image already sets ENTRYPOINT ["docker-entrypoint.sh"], and we replaced that