From 73403a0ddb7271f1d762b183ae5a2e4ddd7f7f6d Mon Sep 17 00:00:00 2001 From: jhodgkin Date: Wed, 8 Jul 2026 10:41:24 -0600 Subject: [PATCH] Switch API base image from Alpine to node:20-slim (Debian) 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 --- api/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 3859494..049a4f4 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -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 . .