Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixing broken docker build#29

Open
davidalbertonogueira wants to merge 1 commit into
strongdm:mainfrom
davidalbertonogueira:patch-1
Open

Fixing broken docker build#29
davidalbertonogueira wants to merge 1 commit into
strongdm:mainfrom
davidalbertonogueira:patch-1

Conversation

@davidalbertonogueira

Copy link
Copy Markdown

Description

This PR fixes the Docker build, which currently fails when building the frontend from a clean environment.

What changed?

  • Updated the frontend Docker base image from node:20-alpine to node:22-alpine.
  • Pinned the pnpm version used by Corepack to 10.17.1 instead of using pnpm@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), causing pnpm install to 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

  • Tests pass locally (cargo test, go test ./..., pnpm test)
  • Documentation updated (Docker build requirements)
  • No compiled binaries committed
  • No secrets or credentials committed

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@latest from unexpectedly breaking CI or local builds.

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.

1 participant