From d4bcebd344a90a73b3a554a48c001f8db2f55729 Mon Sep 17 00:00:00 2001 From: Alajmah <55954113+Alajmah@users.noreply.github.com> Date: Mon, 23 Nov 2026 08:00:48 +0300 Subject: [PATCH] chore(executor): run the executor-service image on Node 24 Stage 2 of the Node 24 transition (#500), after stage 1 (#503). Node 20 reached end of life on 2026-04-30. packages/executor-service/Dockerfile: the base image moves from node:20-alpine to node:24-alpine, and the comment beside it follows. The service has no npm dependencies, so nothing else in the image changes. .github/workflows/ci.yml: the executor image job now checks, inside the built image, what the service depends on and what a change of the base image could move. The validator containers run as --user=1000:1000 and the service writes into /workspace-tmp as the image's own non-root user. So the job requires that the node user is at uid 1000 and gid 1000, that the service process runs as that user, that /workspace-tmp accepts its write, and that docker-cli is present. It also prints the Node version of the image. A merge publishes a release and recreates the three release services. The app and the dashboard keep their Node 20 images until their own stages. Signed-off-by: Alajmah <55954113+Alajmah@users.noreply.github.com> --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ packages/executor-service/Dockerfile | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a34db02..e249d90b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -359,6 +359,26 @@ jobs: exit 1 fi echo "::notice::executor-service serves with status=ok, ready=false (expected in CI)" + # The service runs validator containers as --user=1000:1000 and writes + # into its workspace as the image's own non-root user. Both depend on + # the image: the node user has to exist at uid 1000 and gid 1000, the + # service has to run as that user, and the workspace has to accept its + # writes. This is checked in the image itself, so that a change of the + # base image cannot move it unnoticed. + - name: Verify the process user and the workspace contract in the image + run: | + echo "node in the image: $(docker run --rm --network none --entrypoint node gitwire-executor-service:ci -v)" + ID=$(docker exec gitwire-executor-service-ci sh -c 'id') + echo "service process identity: $ID" + # The whole number has to match: uid=1000, not uid=10000. + echo "$ID" | grep -qE '(^|\s)uid=1000(\(|\s)' || { echo "::error::the service does not run as uid 1000: $ID"; exit 1; } + echo "$ID" | grep -qE '(^|\s)gid=1000(\(|\s)' || { echo "::error::the service does not run as gid 1000: $ID"; exit 1; } + docker exec gitwire-executor-service-ci sh -c 'id node' | grep -qE 'uid=1000\(node\) gid=1000\(node\)' || { echo "::error::the node user is not uid 1000 and gid 1000"; exit 1; } + docker exec gitwire-executor-service-ci sh -c 'test -d /workspace-tmp && touch /workspace-tmp/.ci-write-check && rm /workspace-tmp/.ci-write-check' \ + || { echo "::error::the service user cannot write into /workspace-tmp"; exit 1; } + docker exec gitwire-executor-service-ci sh -c 'test -x /usr/bin/docker && docker --version' \ + || { echo "::error::docker-cli is missing from the image"; exit 1; } + echo "::notice::the image keeps the identity contract: node user at 1000:1000, service runs as it, workspace writable, docker-cli present" - name: Dump executor-service logs on failure if: failure() run: docker logs gitwire-executor-service-ci || true diff --git a/packages/executor-service/Dockerfile b/packages/executor-service/Dockerfile index 07bc0dc8..bfec40f6 100644 --- a/packages/executor-service/Dockerfile +++ b/packages/executor-service/Dockerfile @@ -11,7 +11,7 @@ # (it will be able to run validator containers via the mounted socket), but # the service itself drops root and runs as uid 1000. -FROM node:20-alpine AS runtime +FROM node:24-alpine AS runtime WORKDIR /app # Install docker-cli so probeRuntime() can shell out to `docker --version` @@ -29,7 +29,7 @@ RUN apk add --no-cache docker-cli wget # tempdirs there (mounted as a Docker volume in compose for Docker-in-LXC visibility). RUN mkdir -p /workspace-tmp && chown 1000:1000 /workspace-tmp && chmod 777 /workspace-tmp -# Drop root. node:20-alpine already ships a non-root `node` user at uid 1000 +# Drop root. node:24-alpine already ships a non-root `node` user at uid 1000 # (gid 1000), which matches the validator container's non-root contract. # Creating a fresh executor group at gid 1000 collides with the existing node # group, so we reuse the built-in node user instead.