Skip to content

playwright-screenshots only works in rootful Docker #31174

@richvdh

Description

@richvdh

Steps to reproduce

We have a script to update the playwright screenshots, but it requires rootful Docker, which is forbidden by our IT security policy (with good reason, since rootful Docker gives passwordless root access to your machine).

Outcome

Attempting to run playwright-screenshots under (rootless) podman gives:

$ yarn test:playwright:screenshots
yarn run v1.22.22
$ playwright-screenshots --project=Chrome
Building element-web-playwright-common image in /home/rav/work/element-web/node_modules/@element-hq/element-web-playwright-common
{"type":"warning","data":"Resolution field \"[email protected]\" is incompatible with requested version \"react-is@^17.0.1\""}
{"type":"warning","data":"Resolution field \"[email protected]\" is incompatible with requested version \"react-is@^18.0.0\""}
with Playwright version 1.56.1
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
STEP 1/4: FROM mcr.microsoft.com/playwright:v1.56.1-noble
STEP 2/4: WORKDIR /work
--> Using cache df291806f6358c6d687bc98f8803b51ab1d356275838bc3ef6468d700ce40fef
--> df291806f635
STEP 3/4: RUN apt-get update && apt-get -y install docker.io fonts-dejavu
--> Using cache da247dbd215574f4620bba0ef320f371c08f2874a1bd85673876a1d9af1d81a6
--> da247dbd2155
STEP 4/4: ENTRYPOINT ["npx", "playwright", "test", "--update-snapshots", "--reporter", "line"]
--> Using cache bd3727d8af140082de125dd7cbbc80e23e21c967bb18984581ad5999ab9c60c5
COMMIT element-web-playwright-common
--> bd3727d8af14
Successfully tagged localhost/element-web-playwright-common:latest
bd3727d8af140082de125dd7cbbc80e23e21c967bb18984581ad5999ab9c60c5
~/work/element-web/node_modules ~/work/element-web
~/work/element-web
mounting linked package matrix-js-sdk in container
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: statfs /var/run/docker.sock: permission denied
error Command failed with exit code 125.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Operating system

Debian trixie

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions