Skip to content

fix(docker): drop Alpine yarn from runtime image - #2103

Merged
ffflorian merged 1 commit into
mainfrom
fix/docker-runtime-without-yarn
Nov 14, 2026
Merged

ffflorian merged 1 commit into
mainfrom
fix/docker-runtime-without-yarn

Conversation

@ffflorian

Copy link
Copy Markdown
Owner

apk add yarn in the runtime stage pulls in Alpine's own nodejs package (currently Node.js 24) next to the official Node.js 26 from the base image. Security scanners (e.g. Coolify) then report the Node.js 24 CVEs for the image.

Changes

  • Build stage: verify dist/index.js exists after the build, then prune to production dependencies with yarn workspaces focus --all --production.
  • Runtime stage: install only curl via apk (no yarn), copy dist, node_modules and package.json from the build stage (no second yarn install), and start with node dist/index.js (same command as start:prod).

Testing

  • Ran the build, prune and runtime file set locally: the server starts without errors.
  • docker build runs in CI.

Same fix as ffflorian/familienpraxis-bruehl.de#70.


Generated by Claude Code

Alpine's yarn package depends on Alpine's nodejs package, which put an
outdated Node.js 24 into the runtime image next to the official Node.js 26
and triggered security scanner warnings. Production dependencies are now
installed in the build stage and copied into the runtime image.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P2AmTW9mCkZb9fwBj2GAtV
@ffflorian
ffflorian merged commit 9e5ecea into main Nov 14, 2026
8 checks passed
@ffflorian
ffflorian deleted the fix/docker-runtime-without-yarn branch November 14, 2026 14:01
github-actions Bot pushed a commit that referenced this pull request Nov 14, 2026
## [1.14.38](v1.14.37...v1.14.38) (2026-11-14)

### Bug Fixes

* **docker:** drop Alpine yarn from runtime image ([#2103](#2103)) ([9e5ecea](9e5ecea))

### Continuous Integration

* **deps:** bump ffflorian/actions from 1.30.13 to 1.30.14 ([#2100](#2100)) ([9ce8477](9ce8477))

### Miscellaneous Chores

* **deps-dev:** bump @ffflorian/oxlint-config from 1.0.15 to 1.0.16 ([#2101](#2101)) ([24eaa48](24eaa48))
* **deps-dev:** bump vite from 8.3.5 to 8.3.6 ([#2102](#2102)) [ci skip] ([f37c584](f37c584))
* Update Docker dependencies daily [ci skip] ([41825a6](41825a6))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants