From 3b496411757255554c5d41943fd06a6f18145b08 Mon Sep 17 00:00:00 2001 From: Roman Trashutin Date: Thu, 10 Sep 2026 22:31:27 +0300 Subject: [PATCH] fix(docker): pin libatomic1 for arm64 pnpm builds pnpm's standalone binary (@pnpm/exe) requires libatomic.so.1 on arm64, which node:*-slim doesn't install by default. Production builds started failing with "error while loading shared libraries: libatomic.so.1". Pin the package explicitly instead of depending on it being present by luck/layer-cache inheritance. --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index daa9c74..231be17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,13 @@ WORKDIR /src FROM base AS build +# pnpm's standalone binary (@pnpm/exe) needs libatomic.so.1 on arm64 — +# not present by default on node:*-slim. Pin it explicitly so the build +# doesn't depend on it being present by luck/caching. +RUN apt-get update && \ + apt-get install -y --no-install-recommends libatomic1 && \ + rm -rf /var/lib/apt/lists/* + RUN npm i -g pnpm COPY --link package.json pnpm-lock.yaml pnpm-workspace.yaml ./