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