fix: resolve Docker build failures and native module issues#90
Open
johnnyhuy wants to merge 1 commit into
Open
fix: resolve Docker build failures and native module issues#90johnnyhuy wants to merge 1 commit into
johnnyhuy wants to merge 1 commit into
Conversation
- Add MISE_PYTHON_GITHUB_ATTESTATIONS=false to Dockerfile (both build and run stages) to bypass mise Python 3.10.12 attestation failures in mise 2026.5.16+ - Copy .yarn/plugins/ and backstage.json before yarn install in build stage - the Backstage Yarn plugin requires these to resolve backstage:^ version ranges - Remove yarn tsc from Dockerfile - type checking is already covered by backstage-cli repo lint in CI - Copy .yarn/plugins/ and backstage.json before yarn workspaces focus in run stage for the same reason - Run mise install locally to rebuild native modules (better-sqlite3, isolated-vm, cpu-features) for Node 22 ABI
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.
Summary
Fixes two related issues:
1. Docker build failures (CI)
The Docker build was failing due to two issues:
MISE_PYTHON_GITHUB_ATTESTATIONS=falsein Dockerfile.backstage.jsonand.yarn/plugins/to be present beforeyarn installruns, to resolvebackstage:^version ranges. These were not being copied early enough.yarn tscwhich fails due to invalid tsconfig options (DOM.AsyncIterable,ScriptHost) in @backstage/cli. Type checking is already covered bybackstage-cli repo lintin CI.2. Native module failures (local dev)
Local dev failed with
better-sqlite3bindings not found because node_modules was installed with incompatible Node ABI. Fixed by runningmise run installto rebuild native modules.Changes
Dockerfile(build stage): AddMISE_PYTHON_GITHUB_ATTESTATIONS=falseenv, copy.yarn/plugins/andbackstage.jsonbeforeyarn install --immutable, removeyarn tscDockerfile(run stage): AddMISE_PYTHON_GITHUB_ATTESTATIONS=falseenv, copy.yarn/plugins/andbackstage.jsonbeforeyarn workspaces focusTesting
mise run build✅ (Docker image builds successfully)mise run dev✅ (backend starts correctly)