From 6f31613d3b456fa6acf4ef7a545dd6beb57c891f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=40=E5=88=98=E7=BE=A1=E9=B1=BC?= Date: Wed, 12 Aug 2026 00:01:58 +0800 Subject: [PATCH] feat: add arm64 Google Chrome image (#685) --- .github/workflows/ghcr.yml | 2 +- apps/google-chrome/Dockerfile | 18 ++++++++++++++++-- webpage/docs/installation/docker-images.md | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index b103ab10..2f27ea4e 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -36,7 +36,7 @@ jobs: - name: chromium platforms: linux/amd64,linux/arm64 - name: google-chrome - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 - name: ungoogled-chromium platforms: linux/amd64 - name: microsoft-edge diff --git a/apps/google-chrome/Dockerfile b/apps/google-chrome/Dockerfile index 04347401..d7c3d5f8 100644 --- a/apps/google-chrome/Dockerfile +++ b/apps/google-chrome/Dockerfile @@ -1,13 +1,27 @@ ARG BASE_IMAGE=ghcr.io/m1k1o/neko/base:latest FROM $BASE_IMAGE -ARG SRC_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" +# Set this to a complete .deb URL to pin a specific Chrome version. By default, +# download the package matching the image architecture. +ARG SRC_URL="" # # install google chrome -RUN set -eux; apt-get update; \ +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + amd64|arm64) ;; \ + *) echo "Google Chrome is not available for ${ARCH}" >&2; exit 1 ;; \ + esac; \ + SRC_URL="${SRC_URL:-https://dl.google.com/linux/direct/google-chrome-stable_current_${ARCH}.deb}"; \ + apt-get update; \ wget -O /tmp/google-chrome.deb "${SRC_URL}"; \ apt-get install -y --no-install-recommends openbox /tmp/google-chrome.deb; \ + # Install the ARM64 CDM prepared by the runtime where Chrome discovers it. + if [ "${ARCH}" = "arm64" ]; then \ + mkdir -p /opt/google/chrome/WidevineCdm; \ + find /var/lib/widevine/WidevineCdm/ ! -name "WidevineCdm" -exec cp -RL {} /opt/google/chrome/WidevineCdm/ \; ; \ + fi; \ # # clean up apt-get clean -y; \ diff --git a/webpage/docs/installation/docker-images.md b/webpage/docs/installation/docker-images.md index 3558b99f..ad6b279a 100644 --- a/webpage/docs/installation/docker-images.md +++ b/webpage/docs/installation/docker-images.md @@ -271,7 +271,7 @@ The availability of applications for ARM architecture is limited due to the lack | [Tor Browser](#tor-browser) | ✅ | ❌ | [Forum Post](https://forum.torproject.org/t/tor-browser-for-arm-linux/5240) | | [Waterfox](#waterfox) | ✅ | ❌ | [Github Issue](https://github.com/BrowserWorks/Waterfox/issues/1506), [Reddit](https://www.reddit.com/r/waterfox/comments/jpqsds/are_there_any_builds_for_arm64/) | | [Chromium](#chromium) | ✅ | ✅ \* | - | -| [Google Chrome](#google-chrome) | ✅ | ❌ | [Community Post](https://askubuntu.com/a/1383791) | +| [Google Chrome](#google-chrome) | ✅ | ✅ \* | - | | [Ungoogled Chromium](#ungoogled-chromium) | ✅ | ❌ | [Downloads Page](https://ungoogled-software.github.io/ungoogled-chromium-binaries/) | | [Microsoft Edge](#microsoft-edge) | ✅ | ❌ | [Community Post](https://techcommunity.microsoft.com/discussions/edgeinsiderdiscussions/edge-for-linuxarm64/1532272) | | [Brave](#brave) | ✅ | ✅ \* | - |