Skip to content

Add Python and build tools to Dockerfile build stage#1

Open
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-2TKPTD
Open

Add Python and build tools to Dockerfile build stage#1
railway-app[bot] wants to merge 1 commit into
mainfrom
railway/code-change-2TKPTD

Conversation

@railway-app

@railway-app railway-app Bot commented May 31, 2026

Copy link
Copy Markdown

Problem

The Docker build fails in the build stage when npm install -g flowise triggers node-gyp to compile better-sqlite3 from source. The bare node:20-alpine image has no Python, make, or g++, so node-gyp cannot find a Python installation and the build errors out. These tools were only present in the runtime stage, not the build stage where they're actually needed.

Solution

Added RUN apk add --no-cache python3 make g++ build-base to the build stage in docker/Dockerfile, before the npm install -g flowise command. This gives node-gyp everything it needs to compile native modules from source when prebuilt binaries aren't available for the current Node.js version on Alpine Linux (musl libc).

Changes

  • Modified docker/Dockerfile

Generated by Railway

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.

0 participants