Fix server npm ci: add native build tools for better-sqlite3
Docker Build and Push / build (push) Failing after 3m39s

better-sqlite3 requires python3/make/g++ to compile on Alpine.
Also switches deprecated --only=production to --omit=dev.
Build tools are removed after install to keep image size down.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-26 14:54:01 -04:00
1 parent e7efe3c80d
commit d96d923054
1 file changed
+4 -2
+4 -2
View File
@@ -27,8 +27,10 @@ RUN apk add --no-cache dumb-init
# Copy server package files # Copy server package files
COPY package*.json ./ COPY package*.json ./
# Install production dependencies only # Install build tools for native modules (better-sqlite3), then install deps
RUN npm ci --only=production RUN apk add --no-cache python3 make g++ && \
npm ci --omit=dev && \
apk del python3 make g++
# Copy server code # Copy server code
COPY server ./server COPY server ./server