Fix server npm ci: add native build tools for better-sqlite3
Docker Build and Push / build (push) Failing after 3m39s
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:
1 parent
e7efe3c80d
commit
d96d923054
1 file changed
+4
-2
+4
-2
@@ -27,8 +27,10 @@ RUN apk add --no-cache dumb-init
|
||||
# Copy server package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install production dependencies only
|
||||
RUN npm ci --only=production
|
||||
# Install build tools for native modules (better-sqlite3), then install deps
|
||||
RUN apk add --no-cache python3 make g++ && \
|
||||
npm ci --omit=dev && \
|
||||
apk del python3 make g++
|
||||
|
||||
# Copy server code
|
||||
COPY server ./server
|
||||
|
||||
Reference in new issue
Block a user