chore: bump Dockerfile base to node:24-alpine and add git for npm git-URL deps #10

Merged
brendan merged 1 commits from chore/dockerfile-git-and-node24 into main 2026-05-12 18:48:49 +00:00
Owner

Fixes nanodrop deploy CI failing on npm ci. Two changes in one diff:

  1. Add git to apk install. npm ci resolves bchen-sqlite-migrate@git+https://gitea.bchen.dev/... (package.json:26) which requires git to clone. node:22-alpine (and node:24-alpine) ship without it, so the build failed with the misleading tarball … seems to be corrupted warning followed by ENOENT spawn git.
  2. Bump base node:22-alpinenode:24-alpine. Aligns with authd's stack and avoids npm-10's EBADPLATFORM trap on nested @esbuild/* optional deps (latent in nanodrop's lockfile today).

Companion to authd PR #16 (which only needed the git add; authd was already on node:24-alpine). buchinese needs the same fix; tracked separately in ~/bugs.md.

Verifications

  • better-sqlite3@^12.6.2, bcrypt@^6.0.0, fastify@^5.7.4, tsx@^4.21.0 all ship Node-24 prebuilds or are pure JS — no version bumps required.
  • Lockfile pins bchen-sqlite-migrate to commit SHA 7dbce6637c… (good supply-chain hygiene).
  • src/ has zero child_process/spawn/exec callsites — adding git to the runtime image does not give app code a new shell-out primitive.
  • Docker build was not exercised locally (sandbox blocks docker socket); deploy CI will exercise the real path.
Fixes nanodrop deploy CI failing on `npm ci`. Two changes in one diff: 1. **Add `git` to apk install.** `npm ci` resolves `bchen-sqlite-migrate@git+https://gitea.bchen.dev/...` (package.json:26) which requires `git` to clone. `node:22-alpine` (and `node:24-alpine`) ship without it, so the build failed with the misleading `tarball … seems to be corrupted` warning followed by `ENOENT spawn git`. 2. **Bump base `node:22-alpine` → `node:24-alpine`.** Aligns with authd's stack and avoids npm-10's EBADPLATFORM trap on nested `@esbuild/*` optional deps (latent in nanodrop's lockfile today). Companion to authd PR #16 (which only needed the `git` add; authd was already on node:24-alpine). buchinese needs the same fix; tracked separately in `~/bugs.md`. ## Verifications - `better-sqlite3@^12.6.2`, `bcrypt@^6.0.0`, `fastify@^5.7.4`, `tsx@^4.21.0` all ship Node-24 prebuilds or are pure JS — no version bumps required. - Lockfile pins `bchen-sqlite-migrate` to commit SHA `7dbce6637c…` (good supply-chain hygiene). - `src/` has zero `child_process`/`spawn`/`exec` callsites — adding `git` to the runtime image does not give app code a new shell-out primitive. - Docker build was not exercised locally (sandbox blocks docker socket); deploy CI will exercise the real path.
brendan added 1 commit 2026-05-12 18:48:39 +00:00
Deploy CI was failing on `npm ci` because the base image lacked `git`,
which npm needs to resolve `bchen-sqlite-migrate` from its git URL.
Bumping the base from node:22-alpine to node:24-alpine in the same change
aligns the image with authd's stack (npm 11.x) — both native deps support
Node 24 prebuilds.
brendan merged commit 6e6f4b1acf into main 2026-05-12 18:48:49 +00:00
Sign in to join this conversation.