This is an automated email from the ASF dual-hosted git repository.

thiagoelg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 71624a14091 NO-ISSUE: Simplify Playwright base Containerfile using 
Playwright's official image (#3683)
71624a14091 is described below

commit 71624a140911073638afb25e9a9d1a7496d828fd
Author: Thiago Lugli <[email protected]>
AuthorDate: Thu Jul 30 16:24:34 2026 -0300

    NO-ISSUE: Simplify Playwright base Containerfile using Playwright's 
official image (#3683)
---
 packages/playwright-base/Containerfile | 42 ++++++++--------------------------
 1 file changed, 10 insertions(+), 32 deletions(-)

diff --git a/packages/playwright-base/Containerfile 
b/packages/playwright-base/Containerfile
index 81889f02d7f..0c59f63465a 100644
--- a/packages/playwright-base/Containerfile
+++ b/packages/playwright-base/Containerfile
@@ -15,30 +15,19 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM ubuntu:24.04
+# This base image already ships Ubuntu 24.04, Node.js 24, and 
pre-installed/pre-configured
+# Chromium, Firefox and WebKit browsers (with their OS-level deps).
+# The tag's version must be kept in sync with the `@playwright/test` version 
resolved in
+# pnpm-lock.yaml, otherwise the browsers preinstalled here won't match the 
version used to run the tests.
+FROM mcr.microsoft.com/playwright:v1.62.0-noble
 
 # Set non-interactive mode to prevent tzdata prompt
 ENV DEBIAN_FRONTEND=noninteractive
 
-# Install required dependencies
-RUN apt-get update && apt-get install -y --no-install-recommends \
-    curl \
-    ca-certificates \
-    wget \
-    jq \
-    && rm -rf /var/lib/apt/lists/*
-
-# Adding all dependencies available in GHA `ubuntu-latest`
-RUN curl 
https://raw.githubusercontent.com/actions/runner-images/refs/heads/main/images/ubuntu/toolsets/toolset-2404.json
 > toolset-2404.json && \
-    export APT_PACKAGES="$(cat toolset-2404.json | sed 
s/netcat/netcat-traditional/g | jq -r '.apt | [.vital_packages[], 
.common_packages[], .cmd_packages[]] | join(" ")')" && \
-    apt-get update && \
-    apt-get install -y --no-install-recommends $APT_PACKAGES && \
-    rm -rf /var/lib/apt/lists/* toolset-2404.json
-
-    
 # Configure deb installer to automatically accept mscorefonts eula and install 
fonts
 RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula 
select true" | debconf-set-selections && \
     apt-get update && apt-get install -y --no-install-recommends \
+        jq \
         fonts-ubuntu-classic \
         fonts-dejavu-core \
         fonts-dejavu-extra \
@@ -54,23 +43,12 @@ RUN echo "ttf-mscorefonts-installer 
msttcorefonts/accepted-mscorefonts-eula sele
     rm -rf /var/lib/apt/lists/* && \
     fc-cache -fv
 
-# Set Node.js version
-ENV NODE_VERSION=24.13.1
-
-# Download and install Node.js
-RUN curl -fsSL 
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz";
 -o /tmp/node.tar.gz && \
-    tar -xzf /tmp/node.tar.gz -C /usr/local --strip-components=1 && \
-    rm -rf /tmp/node.tar.gz
-
-# Set Playwright cache folder
-ENV 
PLAYWRIGHT_BROWSERS_PATH=/home/node/kie-tools-playwright/.cache/ms-playwright
-
 # Installing `pnpm` to keep it consistent with the kie-tools repository
 RUN npm install --global [email protected]
-# Installing Playwright browser and dependencies
-# This version must be kept in sync with the `@playwright/test` version 
resolved in pnpm-lock.yaml,
-# otherwise the browsers downloaded here won't match the version used to run 
the tests.
-RUN npx [email protected] install-deps && npx [email protected] install chrome 
chromium webkit
+
+# The base image only preinstalls Chromium/Firefox/WebKit; the branded Google 
Chrome channel
+# used by the test suite is installed separately here, on top of the browsers 
already present.
+RUN npx [email protected] install chrome
 
 WORKDIR /home/node/kie-tools-playwright
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to