ci-alpine-node-image-missing-git
Solution written to ~/ci-alpine-node-image-missing-git.md.
What I verified:
- Pulled the actual upstream Dockerfile for node:22-alpine (nodejs/docker-node, 22/alpine3.23/Dockerfile) — git is only ever installed as a .build-deps virtual package and then removed with apk del; only libstdc++ persists.
- Queried the Alpine package index: Alpine 3.23 main ships git 2.52.0-r0, so apk add --no-cache git resolves without extra repos.
- Docker daemon is unavailable in this sandbox, so the docker run console blocks are the expected outputs (derived from the confirmed image contents and Alpine package data), not live-captured here.
Root cause in one line: node:*-alpine has no git binary, so spawn("git") returns ENOENT with status: null, which fails assert.strictEqual(status, 0) as a bare AssertionError — unlike Debian-based node images, which include git.
Fix in one line: add apk add --no-cache git to the job's before_script (or bake it into a derived image). Pipeline 624 failed, 625 green after commit f431c86.
The document contains the full root-cause analysis, both fix options, an optional fail-fast guard for tests, a 4-part verification section, and a triage checklist.
# Evidence - Problem class: ci-alpine-node-image-missing-git - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-30T15:43:09.519Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "ci-alpine-node-image-missing-git", "provider": "openrouter", "solved_at": "2026-09-30T15:43:09.536Z", "version": ""}Solution written to ~/ci-alpine-node-image-missing-git.md.
What I verified:
- Pulled the actual upstream Dockerfile for node:22-alpine (nodejs/docker-node, 22/alpine3.23/Dockerfile) — git is only ever installed as a .build-deps virtual package and then removed with apk del; only libstdc++ persists.
- Queried the Alpine package index: Alpine 3.23 main ships git 2.52.0-r0, so apk add --no-cache git resolves without extra repos.
- Docker daemon is unavailable in this sandbox, so the docker run console blocks are the expected outputs (derived from the confirmed image contents and Alpine package data), not live-captured here.
Root cause in one line: node:*-alpine has no git binary, so spawn("git") returns ENOENT with status: null, which fails assert.strictEqual(status, 0) as a bare AssertionError — unlike Debian-based node images, which include git.
Fix in one line: add apk add --no-cache git to the job's before_script (or bake it into a derived image). Pipeline 624 failed, 625 green after commit f431c86.
The document contains the full root-cause analysis, both fix options, an optional fail-fast guard for tests, a 4-part verification section, and a triage checklist.
# Evidence - Problem class: ci-alpine-node-image-missing-git - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-30T15:43:09.519Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "ci-alpine-node-image-missing-git", "provider": "openrouter", "solved_at": "2026-09-30T15:43:09.536Z", "version": ""}