From 75ec29b7857e413a84364f9c33ddc6e46d789688 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:43:20 +0000 Subject: [PATCH 1/6] Initial plan From 6e9f10abdc8f42628e615ed7d76235143b53caeb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:46:21 +0000 Subject: [PATCH 2/6] Add Playwright to dev images with dependencies Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com> --- Dockerfile | 3 +++ alpine.Dockerfile | 2 ++ test.php | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6b3688c..3a1315f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,6 +75,9 @@ RUN apt-get update \ && unzip /tmp/JetBrainsMono.zip -d /usr/share/fonts/nerd-fonts/JetBrainsMono \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ + && eval "$(fnm env --use-on-cd --shell bash)" \ + && pnpm install -g playwright \ + && pnpx playwright install --with-deps \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 7f6d4c9..9c95458 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -65,6 +65,8 @@ RUN install-php-extensions xdebug \ && unzip /tmp/JetBrainsMono.zip -d /usr/share/fonts/nerd-fonts/JetBrainsMono \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ + && pnpm install -g playwright \ + && pnpx playwright install --with-deps \ && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* # Switch to the deploy user to install Oh My Zsh and plugins diff --git a/test.php b/test.php index 735dcf8..ce40075 100644 --- a/test.php +++ b/test.php @@ -17,7 +17,7 @@ const PRODUCTION_ONLY_BINARIES = []; -const DEV_ONLY_BINARIES = ['gh', 'htop', 'nano']; +const DEV_ONLY_BINARIES = ['gh', 'htop', 'nano', 'playwright', 'pnpx']; const DEV_BINARIES = [ ...PRODUCTION_BINARIES, From 657e7a8757ce44f66d7b0fcfa5ccec7808d0cb9c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:50:55 +0000 Subject: [PATCH 3/6] Update documentation to mention Playwright Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com> --- README-ALPINE.md | 1 + docker-bake.hcl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README-ALPINE.md b/README-ALPINE.md index f23e40c..f92e9ac 100644 --- a/README-ALPINE.md +++ b/README-ALPINE.md @@ -60,6 +60,7 @@ Both Alpine and Bookworm variants provide the same functionality: ### Development Features (in -dev variants) - ✅ Xdebug PHP extension +- ✅ Playwright for browser automation and testing - ✅ GitHub CLI (`gh`) - ✅ Developer tools (htop, nano, starship prompt) - ✅ Zsh with Oh My Zsh and plugins diff --git a/docker-bake.hcl b/docker-bake.hcl index dcde7a4..386df5e 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -90,7 +90,7 @@ target "default" { } labels = { - "org.opencontainers.image.description" = variant == "dev" ? "FrankenPHP Docker images (${os}) with supervisor, fnm(node version manager), pnpm, sqlsrv, Xdebug, and a few other goodies." : "FrankenPHP Docker images (${os}) with supervisor, fnm(node version manager), pnpm, sqlsrv, and a few other goodies." + "org.opencontainers.image.description" = variant == "dev" ? "FrankenPHP Docker images (${os}) with supervisor, fnm(node version manager), pnpm, Playwright, sqlsrv, Xdebug, and a few other goodies." : "FrankenPHP Docker images (${os}) with supervisor, fnm(node version manager), pnpm, sqlsrv, and a few other goodies." "org.opencontainers.image.created" = "${timestamp()}" "org.opencontainers.image.version" = variant == "dev" ? "${clean_tag(php_version)}-${os}-dev" : "${clean_tag(php_version)}-${os}" "org.opencontainers.image.revision" = SHA From b0c92d0b79d530175bd61c57492047dee5ace7ae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:46:13 +0000 Subject: [PATCH 4/6] Fix pnpm global bin directory issue for Playwright installation Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com> --- Dockerfile | 1 + alpine.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3a1315f..6f6b4fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,6 +76,7 @@ RUN apt-get update \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ && eval "$(fnm env --use-on-cd --shell bash)" \ + && pnpm setup \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && apt-get -y autoremove \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 9c95458..aafd3d7 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -65,6 +65,7 @@ RUN install-php-extensions xdebug \ && unzip /tmp/JetBrainsMono.zip -d /usr/share/fonts/nerd-fonts/JetBrainsMono \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ + && pnpm setup \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* From 266e97ec0c4d9554d271fad05d6d4b297e1f67e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 00:03:36 +0000 Subject: [PATCH 5/6] Replace pnpm setup with sourcing env.sh for Playwright installation Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com> --- Dockerfile | 2 +- alpine.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6f6b4fc..e74224d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ && eval "$(fnm env --use-on-cd --shell bash)" \ - && pnpm setup \ + && source /etc/profile.d/env.sh \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && apt-get -y autoremove \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index aafd3d7..8876ced 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -65,7 +65,7 @@ RUN install-php-extensions xdebug \ && unzip /tmp/JetBrainsMono.zip -d /usr/share/fonts/nerd-fonts/JetBrainsMono \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ - && pnpm setup \ + && source /etc/profile.d/env.sh \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* From d15ca92fd597bd89c8040bbe0e723425fc0023ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 00:42:44 +0000 Subject: [PATCH 6/6] Set PNPM_HOME env var and create /pnpm directory for Playwright Co-authored-by: munezaclovis <51137458+munezaclovis@users.noreply.github.com> --- Dockerfile | 5 ++++- alpine.Dockerfile | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e74224d..cbda9a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,9 @@ RUN apt update \ FROM base AS dev +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" + RUN apt-get update \ && install-php-extensions xdebug \ && (type -p wget >/dev/null || (apt update && apt install wget -y)) \ @@ -76,7 +79,7 @@ RUN apt-get update \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ && eval "$(fnm env --use-on-cd --shell bash)" \ - && source /etc/profile.d/env.sh \ + && mkdir -p -m 777 /pnpm \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && apt-get -y autoremove \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 8876ced..4fae281 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -37,6 +37,9 @@ RUN apk add --no-cache nodejs npm jpegoptim optipng pngquant gifsicle libavif li FROM base AS dev +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" + RUN install-php-extensions xdebug \ && apk add --no-cache wget tar gzip \ && ARCH=$(uname -m) \ @@ -65,7 +68,7 @@ RUN install-php-extensions xdebug \ && unzip /tmp/JetBrainsMono.zip -d /usr/share/fonts/nerd-fonts/JetBrainsMono \ && rm /tmp/JetBrainsMono.zip \ && fc-cache -fv \ - && source /etc/profile.d/env.sh \ + && mkdir -p -m 777 /pnpm \ && pnpm install -g playwright \ && pnpx playwright install --with-deps \ && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*