CI-Node is a docker image intended to be used in continuous integration services such as GitLab CI, GitHub Actions, Semaphore CI and Circle CI
Every line is built on Alpine and on Debian (debian:trixie-slim), each from the matching panascais/node variant. The Alpine images own the unsuffixed tags, as before, and also carry an -alpine suffix; the Debian images only carry a -debian suffix. latest becomes the bare variant name and latest-<variant>:
| Alpine | Debian |
|---|---|
26, 26-alpine |
26-debian |
26.13, 26.13-alpine |
26.13-debian |
26.13.1, 26.13.1-alpine |
26.13.1-debian |
latest, alpine, latest-alpine |
debian, latest-debian |
lts, lts-alpine |
lts-debian |
docker is the client with the buildx and compose plugins, without a daemon. A job reaches the daemon of its runner through the Docker socket the runner mounts.
Every numeric directory is a line named after its node major version, with a Dockerfile.alpine and a Dockerfile.debian sharing the line's build context. A build target is <line>-<variant>. configuration/ pins the node release and pnpm major per line, the published panascais/node <release>-debian and <release>-alpine digests per target, the Debian and Alpine base images and the docker image the client comes from, the latest and lts aliases, and the bun, deno, flyctl and nub releases with the sha256 digest of each architecture's download in tools.json, which pins bun and nub once per libc, -gnu for Debian and -musl for Alpine.
Smoke test, build and load node 24 for the local platform:
go run ./scripts build 24
go run ./scripts build 24-debianA bare line builds the Alpine variant. Locally the build starts from ghcr.io/panascais-docker/node/node:<release>-<variant> in the local image store, so run the same go run ./scripts build in a checkout of panascais-docker/node first to test both images together. ./scripts/build-all-parallel.sh [target...] builds every target at once in either repository and logs each build to $TMPDIR/<repository>-builds.
Refresh the pins from the node repository (or a local checkout of it) and the newest bun, deno, flyctl and nub releases on GitHub:
go run ./scripts update
go run ./scripts update --node ../node/configurationGitHub Actions builds and publishes with the shared toolkit, GHCR first. The node repository starts the update workflow right after it publishes, update also runs every 6 hours, and main runs on every push and weekly.
plancompares each target's fingerprint with the annotation on the image published to GHCR and lists the stale targets. A manual or weekly scheduled run ofmainforces every target, so the images pick up fixes of their unpinned Alpine and Debian packages.buildruns the whole matrix at once. It signs in to every registry first, so base image pulls are authenticated, smoke tests the target and pushes it by digest per architecture to GHCR only.publishtags the digests as multi-platform images on GHCR. ci-node-internal starts right after it.mirrorcopies every tag from GHCR to Docker Hub and Quay by digest, so the images are identical on all three registries. It only reads from GHCR and skips a tag whose digest already matches, which keeps it clear of the Docker Hub pull quota and repairs a previous mirror on the next run.
Registry requests that fail with a transient error, such as a 429 burst, a 5xx response or a timeout, are retried inside the job. Every build pulls Docker Hub images, BuildKit included, through mirror.gcr.io with the toolkit's setup-builder action, and falls back to Docker Hub only when the mirror has not cached an image yet.
BuildKit cache mounts speed up rebuilds by reusing downloaded packages between builds. apt (Debian), apk (Alpine) and pnpm use them in this image.
The apt install layers mount /var/cache/apt and /var/lib/apt/lists under ci-node-apt-*-${TARGETARCH} IDs. The image stage moves Debian's docker-clean apt hook aside only for its install, so images built on top keep the stock apt behavior. The tools stage downloads bun, deno, flyctl and nub with retries and checks them against the pinned digests. deno only ships glibc builds, so on Debian it runs as is, and on Alpine it is patched to load an isolated glibc copied from distroless.
RUN --mount=type=cache,id=ci-node-apt-cache-${TARGETARCH},sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=ci-node-apt-lists-${TARGETARCH},sharing=locked,target=/var/lib/apt/lists \
mv /etc/apt/apt.conf.d/docker-clean /etc/apt/docker-clean \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
...
&& mv /etc/apt/docker-clean /etc/apt/apt.conf.d/docker-cleanAlpine's gcompat, libc6-compat, musl* and linux-headers have no Debian counterpart to install (build-essential brings the kernel headers), and trixie does not package simdutf.
The large apk install layer mounts /apk/cache so .apk files are reused across builds. Cache IDs include ${TARGETARCH} so amd64 and arm64 packages do not mix during multi-platform builds. sharing=locked avoids races when matrix jobs build in parallel.
RUN --mount=type=cache,id=ci-node-apk-${TARGETARCH},sharing=locked,target=/apk/cache \
apk update --cache-dir /apk/cache \
&& apk add --cache-dir /apk/cache --cache-predownload \
...Alpine 3.24 ships apk-tools 3.x, where --update / -U means --cache-max-age 0 (always refetch). Do not use it with cache mounts. Pass 1 writes into /apk/cache; when the apk layer re-runs, --cache-predownload reuses cached .apk files. The mount never lands in the final image.
Node patch tags and the pnpm major come from the base image repository: configuration/versions.json and configuration/pnpm.json. go run ./scripts update pins them in this repository together with the published -debian and -alpine image digests once both are published, and the build passes --build-arg NODE_IMAGE=<image@digest> (the base image in FROM) and --build-arg PNPM_VERSION=<upstream major>. ci-node does not keep a local pnpm config copy, and it does not reinstall pnpm@N in the global package list — every supported base already ships that executable.
pnpm 10+ (Node 18+): global binaries live under $PNPM_HOME/bin. Every Node 18+ image inherits PNPM_HOME=/root/.local/share/pnpm, /root/.local/share/pnpm/bin on PATH, and enableGlobalVirtualStore: false (/root/.config/pnpm/config.yaml) from the authoritative base image. pnpm 10 ignores globalBinDir in that yaml file and falls back to PNPM_HOME, which is not on PATH (pnpm#11205). pnpm config set global-bin-dir /root/.local/share/pnpm/bin writes the rc file those versions read, then install with pnpm add -g. Cache-mount the store at /root/.local/share/pnpm/store. Without enableGlobalVirtualStore: false, a store cache mount can break global CLIs at runtime (ae38d12).
pnpm 8 and below (Node 17 and older): single-pass pnpm i -g with the store cache-mounted at pnpm’s default path for that image (no --store-dir override). Measure with the same ENV as the Dockerfile (pnpm store path).
Cache IDs are ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH} so the pnpm major is not checked in.
| pnpm | Node | PNPM_HOME in ci-node |
pnpm store path |
Cache mount target= |
Cache id |
|---|---|---|---|---|---|
| 6 | 12 | (none; bins in /usr/local/bin) |
/root/.pnpm-store/v3 |
/root/.pnpm-store |
ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH} |
| 7–8 | 14–17 | .../pnpm/bin |
.../pnpm/bin/store/v3 |
/root/.local/share/pnpm/bin/store |
ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH} |
| 10+ | 18+ | /root/.local/share/pnpm |
.../pnpm/store/v10 |
/root/.local/share/pnpm/store |
ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH} |
# Node 12 (pnpm 6; store at ~/.pnpm-store, global bins in /usr/local/bin)
RUN --mount=type=cache,id=ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH},sharing=locked,target=/root/.pnpm-store \
packages=" ... " \
&& pnpm i -g $packages
# Node 14–17 (pnpm 7–8)
RUN --mount=type=cache,id=ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH},sharing=locked,target=/root/.local/share/pnpm/bin/store \
packages=" ... " \
&& mkdir -p /root/.local/share/pnpm/bin \
&& pnpm i -g $packages
# Node 18+ (pnpm 10+; inherit PNPM_HOME/bin PATH and enableGlobalVirtualStore: false from the base node image)
RUN --mount=type=cache,id=ci-node-pnpm-${PNPM_VERSION}-${TARGETARCH},sharing=locked,target=/root/.local/share/pnpm/store \
packages=" ... " \
buildable=" --allow-build=... " \
&& mkdir -p /root/.local/share/pnpm/bin \
&& pnpm config set global-bin-dir /root/.local/share/pnpm/bin \
&& pnpm add -g $packages $buildableMount the parent directory (pnpm creates v3 / v10 subdirs inside). ${TARGETARCH} and sharing=locked avoid cross-arch mixing and parallel-build store corruption. Layout commands stay explicit per known pnpm major; a future major is not inferred from the number alone.
When building application images on top of ci-node, use a separate project store (pnpm Docker docs):
ENV PNPM_HOME=/pnpm
ENV PATH=${PNPM_HOME}:${PATH}
RUN --mount=type=cache,id=pnpm-${TARGETARCH},sharing=locked,target=/pnpm/store \
pnpm install --frozen-lockfilepnpm itself comes from /usr/local/bin/pnpm on the base node image.
- Silas Rech (silas@panascais.net)
- Maximilian Schagginger (max@panascais.net)
Interested in contributing to CI-Node? Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.