From 9470345eb340614fcf2b49482713717f3427c183 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Sat, 31 Oct 2026 21:01:40 +0100 Subject: [PATCH] Install libatomic so Node can start The official Node 26 Linux binaries are dynamically linked against libatomic.so.1, which the minimal Ubuntu base image does not ship. The image built fine but node could not start, so the break only surfaced downstream: browsertime's Docker build failed at npm install with exit code 127. sitespeed.io only worked because build-essential pulled libatomic1 in by accident. Running node at the end of the build makes a missing runtime library fail here, in the image that ships Node, instead of in the images built on top of it. Assisted-by: Claude Opus 5.5 noreply@anthropic.com --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a790329..ff49fe5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV NODE_VERSION=26.13.0 RUN export PLATFORM=$(if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then echo "x64"; else echo "arm64"; fi) \ && buildDeps='xz-utils curl gnupg2 lsb-release dirmngr' \ && set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates $buildDeps \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates libatomic1 $buildDeps \ && rm -rf /var/lib/apt/lists/* \ # gpg keys listed at https://github.com/nodejs/node#release-keys && set -ex \ @@ -38,7 +38,8 @@ RUN export PLATFORM=$(if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then echo "x64" && { gpgconf --kill all || true; } \ && rm -rf "$GNUPGHOME" \ && apt-get purge -y --auto-remove $buildDeps \ - && ln -s /usr/local/bin/node /usr/local/bin/nodejs + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + && node --version CMD [ "npm", "--version" ]