diff --git a/.github/docker/Dockerfile.ci b/.github/docker/Dockerfile.ci index 1048bb47..4aaff408 100644 --- a/.github/docker/Dockerfile.ci +++ b/.github/docker/Dockerfile.ci @@ -18,9 +18,19 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ && rm -rf /var/lib/apt/lists/* # Node.js 22 LTS (needed for claude CLI) -RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ - && apt-get install -y --no-install-recommends nodejs \ - && rm -rf /var/lib/apt/lists/* +# Install from the official nodejs.org tarball instead of NodeSource's apt setup. +# NodeSource's setup_22.x script runs its own `apt-get update` + `apt-get install gnupg`, +# both of which depend on archive.ubuntu.com / security.ubuntu.com being reachable. +# Ubicloud CI runners frequently can't reach those mirrors (connection timeouts), +# and "gnupg" was renamed to "gpg" on Ubuntu 24.04 anyway, so NodeSource's script +# fails before it can add its own repo. Direct tarball download is network-simpler +# (one host: nodejs.org) and doesn't touch apt at all. +ENV NODE_VERSION=22.20.0 +RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" -o /tmp/node.tar.xz \ + && tar -xJ -C /usr/local --strip-components=1 --no-same-owner -f /tmp/node.tar.xz \ + && rm -f /tmp/node.tar.xz \ + && node --version \ + && npm --version # Bun (install to /usr/local so non-root users can access it) ENV BUN_INSTALL="/usr/local"