fix(docker): make sqlite3 native build explicit and fail fast - #96
Open
thetelgote wants to merge 1 commit into
Open
fix(docker): make sqlite3 native build explicit and fail fast#96thetelgote wants to merge 1 commit into
thetelgote wants to merge 1 commit into
Conversation
- Pin python3/make/g++ explicitly in the sqlite3-build stage instead of relying on the base node:22 image's incidental toolchain. - Add a build-time check that the compiled .node binary actually exists where sqlite3/bindings.js expects it, so a broken compile fails loudly at build time instead of surfacing as a cryptic 'Could not locate the bindings file' error deep in the test stage (issue docker#92).
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
This PR improves the
sqlite3-buildstage in the Dockerfile by making the native addon build process explicit and adding an early verification step.Changes
python3,make,g++) explicitly in thesqlite3-buildstage instead of relying on the upstreamnode:22image.sqlite3native binding usingnode-gyp.node_modules/sqlite3/build/Release/node_sqlite3.nodeexists.Why
Previously, the Docker build relied on the base image implicitly providing the required compilation tools. If the native binding failed to build, the error only appeared later during the test stage as: