From 3830544e131d2f7d8f76daf0fbf5528f846c6019 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 18 May 2026 02:24:38 -0700 Subject: [PATCH] Update Docker runtime dependencies --- Dockerfile | 19 +++++++++++++++---- archivebox/config.py | 5 ++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f38e04d..ffb5faa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,9 +45,10 @@ ENV TZ=UTC \ # Version config ENV PYTHON_VERSION=3.11 \ - NODE_VERSION=20 \ + NODE_VERSION=24 \ PLAYWRIGHT_VERSION=1.59.0 \ - YTDLP_VERSION=2026.3.17 + YTDLP_VERSION=2026.3.17 \ + GOSU_VERSION=1.19 # User config ENV ARCHIVEBOX_USER="archivebox" \ @@ -115,10 +116,20 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T # 1. packaging dependencies apt-transport-https ca-certificates apt-utils gnupg2 curl wget \ # 2. docker and init system dependencies - zlib1g-dev dumb-init gosu cron unzip grep \ + zlib1g-dev dumb-init cron unzip grep \ # 3. frivolous CLI helpers to make debugging failed archiving easier # nano iputils-ping dnsutils htop procps jq yq - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && case "$TARGETARCH/$TARGETVARIANT" in \ + amd64/) GOSU_ARCH=amd64; GOSU_SHA256=52c8749d0142edd234e9d6bd5237dff2d81e71f43537e2f4f66f75dd4b243dd0 ;; \ + arm64/) GOSU_ARCH=arm64; GOSU_SHA256=3a8ef022d82c0bc4a98bcb144e77da714c25fcfa64dccc57f6aba7ae47ff1a44 ;; \ + arm/v7) GOSU_ARCH=armhf; GOSU_SHA256=8457a0bfd28e016c2c7d8ea6e5f7eed1376033ffbd36491bb455094c8b1dc9fd ;; \ + *) echo "Unsupported gosu platform: $TARGETARCH/$TARGETVARIANT"; exit 1 ;; \ + esac \ + && curl -fsSL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$GOSU_ARCH" \ + && echo "$GOSU_SHA256 /usr/local/bin/gosu" | sha256sum -c - \ + && chmod +x /usr/local/bin/gosu \ + && gosu --version | head -n1 | tee -a /VERSION.txt ######### Language Environments #################################### diff --git a/archivebox/config.py b/archivebox/config.py index c4a3aef6..e683651e 100644 --- a/archivebox/config.py +++ b/archivebox/config.py @@ -836,7 +836,10 @@ def bin_version(binary: Optional[str]) -> Optional[str]: if not version_str: version_str = run([abspath, "--version"], stdout=PIPE).stdout.strip().decode() # take first 3 columns of first line of version info - return ' '.join(version_str.split('\n')[0].strip().split()[:3]) + version_parts = version_str.split('\n')[0].strip().split() + if version_parts[:4] == ['Google', 'Chrome', 'for', 'Testing']: + return ' '.join(version_parts[:5]) + return ' '.join(version_parts[:3]) except OSError: pass # stderr(f'[X] Unable to find working version of dependency: {binary}', color='red')