From b92c674726c2ca141e32aa51e0cfa9962a086140 Mon Sep 17 00:00:00 2001 From: khannurien Date: Tue, 20 Oct 2026 18:08:53 +0000 Subject: [PATCH] =?UTF-8?q?v4:=20the=20devcontainer=20has=20Playwright's?= =?UTF-8?q?=20browsers=20=E2=80=94=20they=20were=20installed=20by=20hand?= =?UTF-8?q?=20in=20the=20home=20directory,=20which=20the=20rebuild=20onto?= =?UTF-8?q?=20Node=2026=20left=20without=20them,=20and=20the=20screenshots?= =?UTF-8?q?=20of=20the=20dev=20instances=20stopped=20working.=20The=20Dock?= =?UTF-8?q?erfile=20installs=20Firefox=20and=20the=20Chromium=20headless?= =?UTF-8?q?=20shell=20of=20npm:playwright@1.63.0,=20with=20the=20system=20?= =?UTF-8?q?libraries=20they=20need,=20in=20/opt/ms-playwright=20(PLAYWRIGH?= =?UTF-8?q?T=5FBROWSERS=5FPATH),=20which=20the=20workspace=20and=20the=20i?= =?UTF-8?q?nstances'=20services=20share=20as=20part=20of=20the=20image.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .devcontainer/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c7002862..2b155d9d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,6 +6,15 @@ COPY --from=deno /deno /usr/local/bin/deno RUN apt-get update \ && apt-get install -y --no-install-recommends ffmpeg \ && rm -rf /var/lib/apt/lists/* +# Playwright's Firefox and Chromium headless shell, with the system libraries +# they need, for screenshots of the dev instances (`npm:playwright@1.63.0`): a +# script importing another version looks for other builds. They live outside +# the home directory, which a rebuild would otherwise leave without them. +ENV PLAYWRIGHT_BROWSERS_PATH=/opt/ms-playwright +RUN DENO_DIR=/tmp/deno deno run --no-lock -A npm:playwright@1.63.0 install \ + --with-deps firefox chromium-headless-shell \ + && chmod -R a+rX /opt/ms-playwright \ + && rm -rf /tmp/deno /var/lib/apt/lists/* # The services share Deno's cache through a volume (compose.yaml), which Docker # creates owned as this directory is, so it must exist and be node's. RUN mkdir -p /home/node/.cache/deno && chown -R node:node /home/node/.cache