Switch API base image from Alpine to node:20-slim (Debian)
Deploy to Dev / Deploy & Smoke Test (push) Successful in 1m14s
Deploy to Dev / Deploy & Smoke Test (push) Successful in 1m14s
better-sqlite3's prebuild-install downloads prebuilt glibc binaries for linux-x64, which fail on Alpine's musl libc with 'fcntl64: symbol not found'. npm_config_build_from_source was not being honoured. Switching to a glibc-based image sidesteps the issue entirely; homelab image size is fine. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-5
@@ -1,13 +1,11 @@
|
||||
FROM node:20-alpine
|
||||
FROM node:20-slim
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
RUN apt-get update -qq && apt-get install -y -qq python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
# build_from_source tells prebuild-install to compile better-sqlite3 against
|
||||
# musl (Alpine) instead of downloading a prebuilt glibc binary
|
||||
RUN npm_config_build_from_source=true npm ci --omit=dev
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user