Fixing broken docker build#29
Open
davidalbertonogueira wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the Docker build, which currently fails when building the frontend from a clean environment.
What changed?
node:20-alpinetonode:22-alpine.10.17.1instead of usingpnpm@latest.Why?
The current Dockerfile installs
pnpm@latest, which currently resolves to pnpm 11. Recent pnpm releases changed the behavior of ignored dependency build scripts (ERR_PNPM_IGNORED_BUILDS), causingpnpm installto exit with a non-zero status during the Docker build.Additionally, pnpm 11 requires newer Node.js features (
node:sqlite) that are unavailable in Node 20, causing the original Docker build to fail before dependency installation.Using Node 22 together with a pinned pnpm version restores a reproducible Docker build and avoids future breakages caused by automatically consuming newer pnpm releases.
How to test?
docker build --no-cache -t cxdb:latest .The frontend dependency installation should complete successfully and the build should continue to the backend stage.
Checklist
cargo test,go test ./...,pnpm test)Related Issues
Fixes #
Additional Notes
This change only affects the Docker build environment and does not modify application code or runtime behavior. Pinning the package manager version also makes the Docker build reproducible by preventing future changes in
pnpm@latestfrom unexpectedly breaking CI or local builds.