From 35a59f5bf5bb61f91b1a1927166235b54de56484 Mon Sep 17 00:00:00 2001 From: Steven Miller Date: Wed, 1 Apr 2026 14:50:46 -0400 Subject: [PATCH 1/2] Revert "fix: resolve chromedriver download by Chromium build line (#191)" This reverts commit 033ec7de92fd050fbb53e542db4843e6388325c1. --- images/chromium-headful/Dockerfile | 6 +++--- images/chromium-headless/image/Dockerfile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images/chromium-headful/Dockerfile b/images/chromium-headful/Dockerfile index f800fa0b..cdb6f8b7 100644 --- a/images/chromium-headful/Dockerfile +++ b/images/chromium-headful/Dockerfile @@ -290,10 +290,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-ap apt -y install chromium && \ apt --no-install-recommends -y install sqlite3; -# Chromedriver and Chromium are not necessarily the same version. -ARG CHROMEDRIVER_VERSION=146.0.7680.165 +# Install ChromeDriver matching the installed Chromium version RUN set -eux; \ - curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ + CHROMIUM_VERSION=$(chromium --version | awk '{print $2}'); \ + curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMIUM_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ unzip /tmp/cd.zip -d /tmp; \ mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver; \ chmod +x /usr/local/bin/chromedriver; \ diff --git a/images/chromium-headless/image/Dockerfile b/images/chromium-headless/image/Dockerfile index aa7d17ea..7be9610e 100644 --- a/images/chromium-headless/image/Dockerfile +++ b/images/chromium-headless/image/Dockerfile @@ -156,10 +156,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-ap apt-get -y install chromium && \ apt-get --no-install-recommends -y install sqlite3 unzip; -# Chromedriver and Chromium are not necessarily the same version. -ARG CHROMEDRIVER_VERSION=146.0.7680.165 +# Install ChromeDriver matching the installed Chromium version RUN set -eux; \ - curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ + CHROMIUM_VERSION=$(chromium --version | awk '{print $2}'); \ + curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMIUM_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ unzip /tmp/cd.zip -d /tmp; \ mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver; \ chmod +x /usr/local/bin/chromedriver; \ From 11dbef6b9eb7a029005999104a39aad141d420ce Mon Sep 17 00:00:00 2001 From: Steven Miller Date: Wed, 1 Apr 2026 14:55:20 -0400 Subject: [PATCH 2/2] Version pin chrome --- images/chromium-headful/Dockerfile | 10 +++++++--- images/chromium-headless/image/Dockerfile | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/images/chromium-headful/Dockerfile b/images/chromium-headful/Dockerfile index cdb6f8b7..c2bcca0e 100644 --- a/images/chromium-headful/Dockerfile +++ b/images/chromium-headful/Dockerfile @@ -1,3 +1,5 @@ +ARG CHROME_VERSION=145.0.7632.75 + FROM docker.io/golang:1.25.0 AS server-builder WORKDIR /workspace/server @@ -152,6 +154,7 @@ FROM node:22-bullseye-slim AS node-22 FROM docker.io/ubuntu:22.04 # Allow cross-compilation when building with BuildKit platforms +ARG CHROME_VERSION ARG TARGETARCH ARG TARGETOS ARG CACHEIDPREFIX=${TARGETOS:-linux}-${TARGETARCH:-amd64}-ubuntu2204 @@ -287,13 +290,14 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-ap RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-apt-cache \ --mount=type=cache,target=/var/lib/apt,sharing=locked,id=$CACHEIDPREFIX-apt-lib \ apt update -y && \ - apt -y install chromium && \ + CHROMIUM_PKG_VERSION="$(apt-cache madison chromium | awk -v v="$CHROME_VERSION" '$3 ~ ("^" v) { print $3; exit }')" && \ + test -n "$CHROMIUM_PKG_VERSION" && \ + apt -y install "chromium=$CHROMIUM_PKG_VERSION" && \ apt --no-install-recommends -y install sqlite3; # Install ChromeDriver matching the installed Chromium version RUN set -eux; \ - CHROMIUM_VERSION=$(chromium --version | awk '{print $2}'); \ - curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMIUM_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ + curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ unzip /tmp/cd.zip -d /tmp; \ mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver; \ chmod +x /usr/local/bin/chromedriver; \ diff --git a/images/chromium-headless/image/Dockerfile b/images/chromium-headless/image/Dockerfile index 7be9610e..4f4a88ba 100644 --- a/images/chromium-headless/image/Dockerfile +++ b/images/chromium-headless/image/Dockerfile @@ -1,3 +1,5 @@ +ARG CHROME_VERSION=145.0.7632.75 + FROM docker.io/golang:1.25.0 AS server-builder WORKDIR /workspace/server @@ -98,6 +100,7 @@ FROM node:22-bullseye-slim AS node-22 FROM docker.io/ubuntu:22.04 # Allow cross-compilation when building with BuildKit platforms +ARG CHROME_VERSION ARG TARGETARCH ARG TARGETOS ARG CACHEIDPREFIX=${TARGETOS:-linux}-${TARGETARCH:-amd64}-ubuntu2204 @@ -153,13 +156,14 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-ap RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=$CACHEIDPREFIX-apt-cache \ --mount=type=cache,target=/var/lib/apt,sharing=locked,id=$CACHEIDPREFIX-apt-lib \ apt-get update -y && \ - apt-get -y install chromium && \ + CHROMIUM_PKG_VERSION="$(apt-cache madison chromium | awk -v v="$CHROME_VERSION" '$3 ~ ("^" v) { print $3; exit }')" && \ + test -n "$CHROMIUM_PKG_VERSION" && \ + apt-get -y install "chromium=$CHROMIUM_PKG_VERSION" && \ apt-get --no-install-recommends -y install sqlite3 unzip; # Install ChromeDriver matching the installed Chromium version RUN set -eux; \ - CHROMIUM_VERSION=$(chromium --version | awk '{print $2}'); \ - curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROMIUM_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ + curl -fsSL "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" -o /tmp/cd.zip; \ unzip /tmp/cd.zip -d /tmp; \ mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver; \ chmod +x /usr/local/bin/chromedriver; \