From 00aa075d477811bbf0f02098ce0196c110701faa Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Tue, 7 Apr 2026 14:50:09 +0200 Subject: [PATCH] fix: keep python3 runtime, verify native binding path, selective cleanup apk del python3 cascades to remove sqlite-libs. Only remove make/g++. Add debug step to verify better_sqlite3.node was built. Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f41bdc8..37fa171 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,12 @@ WORKDIR /app RUN corepack enable pnpm COPY package.json pnpm-lock.yaml ./ RUN pnpm install --frozen-lockfile +# Verify native binding was built +RUN find node_modules -name "better_sqlite3.node" -ls COPY . . RUN pnpm run build -RUN apk del python3 make g++ && rm -rf /root/.cache /tmp/* +# Keep only build tools cleanup that won't remove sqlite-libs +RUN apk del make g++ && rm -rf /root/.cache /tmp/* RUN mkdir -p /data && chown node:node /data USER node ENV NODE_ENV=production