From ccadd73953f6657c9620db4ea1665027c4107965 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:27:00 +0000 Subject: [PATCH] playwright-screenshots: fix incompatibility with podman (#189) Podman doesn't recognise the `volume-nocopy` option on mounts. It doesn't seem to be necessary so let's omit it. --- .../playwright-screenshots.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/element-web-playwright-common/playwright-screenshots.sh b/packages/element-web-playwright-common/playwright-screenshots.sh index 04455ae4da..36550c677a 100755 --- a/packages/element-web-playwright-common/playwright-screenshots.sh +++ b/packages/element-web-playwright-common/playwright-screenshots.sh @@ -8,6 +8,8 @@ SCRIPT_DIR=$(dirname "$SCRIPT_PATH") IMAGE_NAME="element-web-playwright-common" +if docker --version | grep -q podman; then docker_is_podman=1; fi + build_image() { echo "Building $IMAGE_NAME image in $SCRIPT_DIR" @@ -59,7 +61,10 @@ while [[ $# -gt 0 ]]; do # It's a volume rather than a directory because otherwise things tend to start picking up # files from it in the native environment and break. --with-node-modules) - RUN_ARGS+=(--mount "type=volume,src=ew-docker-node-modules,dst=/work/node_modules,volume-nocopy" -e YARN_INSTALL=true) + mount_param="type=volume,src=ew-docker-node-modules,dst=/work/node_modules" + # podman doesn't support `volume-nocopy` + if [ -z "$docker_is_podman" ]; then mount_param+=",volume-nocopy"; fi + RUN_ARGS+=(--mount "${mount_param}" -e YARN_INSTALL=true) shift ;; # Sets a different entrypoint (in which case the default arguments to the script will be ignored) @@ -84,7 +89,7 @@ popd > /dev/null for LINK in $SYMLINKS; do TARGET=$(readlink -f "node_modules/$LINK") || true if [ -d "$TARGET" ]; then - if docker --version | grep -q podman; then + if [ -n "$docker_is_podman" ]; then echo -e "\033[31m" >&2 cat <<'EOF' >&2 WARNING: `node_modules` contains symlinks, and the support for this in