Skip to content

Add deps to builder stage for better-sqlite3 compilation#214

Merged
jNullj merged 2 commits intomasterfrom
copilot/fix-builder-container-install-python
Nov 1, 2025
Merged

Add deps to builder stage for better-sqlite3 compilation#214
jNullj merged 2 commits intomasterfrom
copilot/fix-builder-container-install-python

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 1, 2025

better-sqlite3 does not provide prebuilt bins for node 25 yet* addon requiring compilation during npm install. Alpine Linux lacks build dependencies by default.

Changes

Added build toolchain to Dockerfile builder stage:

# Install build dependencies
# Python is required for building better-sqlite3
# Fixes: https://github.com/WiseLibs/better-sqlite3/issues/1411
RUN apk add --no-cache python3 make g++

Dependencies install in builder stage only, keeping final image lean. Enables node-gyp to compile native modules successfully.

Original prompt

open a PR to fix build of better-sqlite3 failing as python is missing by adding bython to the builder container.
mention that this fixes WiseLibs/better-sqlite3#1411 until fixed as a comment


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jNullj <15849761+jNullj@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build failure by adding Python to builder container Add Python to builder stage for better-sqlite3 compilation Nov 1, 2025
Copilot AI requested a review from jNullj November 1, 2025 11:18
@jNullj jNullj changed the title Add Python to builder stage for better-sqlite3 compilation Add deps to builder stage for better-sqlite3 compilation Nov 1, 2025
@jNullj jNullj marked this pull request as ready for review November 1, 2025 11:32
@jNullj jNullj merged commit a2d6f70 into master Nov 1, 2025
3 checks passed
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.

better-sqlite3 12.3.0 fails to build on Node.js latest (25)

2 participants