From ef92058caad4ce9c3ae8576ca339d1d9f1e182a4 Mon Sep 17 00:00:00 2001 From: Joseph Mearman Date: Mon, 28 Sep 2026 20:56:24 +0100 Subject: [PATCH] fix: register gcc-11/g++-11 as the generic gcc/g++/cc/c++ alternatives Installing gcc-11 and g++-11 only provides the versioned binaries; no generic gcc/g++/cc/c++ command existed, so node-gyp (and any other tool invoking the plain compiler names, as make-based builds do) failed with "g++: No such file or directory" even after make was installed. --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1e0ff26..8cd563b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,10 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ gcc-11 g++-11 make unzip \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-11 100 \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-11 100 \ && rm -rf /var/lib/apt/lists/* # Bun (JS runtime), installed system-wide. Explicit bash -c (the default RUN