Skip to content

Commit 132e566

Browse files
authored
build: Fix crash loop caused by better-sqlite3 and node. (#2996)
As outlined in #2989 Karakeep keeps crashing due to a bad interaction between node 24.19 and better-sqlite3. This commit pins node to 24.18.1 for Docker builds, which still works fine. Once the bug is fixed in node and the fixed version has been uploaded to Docker hub, this commit can be reverted.
1 parent f57aad1 commit 132e566

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎docker/Dockerfile‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ RUN apt-get update \
99
&& cargo install monolith --locked
1010

1111
################# Base Builder ##############
12-
FROM node:24-slim AS base
12+
# Replace with node:24-slim as soon as https://github.com/nodejs/node/pull/65042 is fixed and uploaded to Docker hub
13+
FROM node:24.18.1-slim AS base
1314

1415
WORKDIR /app
1516
ENV PNPM_HOME="/pnpm"
@@ -75,7 +76,8 @@ RUN (cd apps/mcp && pnpm --config.verify-deps-before-run=false build)
7576

7677
################# The All-in-one builder ##############
7778

78-
FROM node:24-slim AS aio_builder
79+
# Replace with node:24-slim as soon as https://github.com/nodejs/node/pull/65042 is fixed and uploaded to Docker hub
80+
FROM node:24.18.1-slim AS aio_builder
7981
LABEL org.opencontainers.image.source="https://github.com/karakeep-app/karakeep"
8082
WORKDIR /app
8183

@@ -202,7 +204,8 @@ ENV USING_LEGACY_SEPARATE_CONTAINERS=true
202204

203205
################# The cli ##############
204206

205-
FROM node:24-slim AS cli
207+
# Replace with node:24-slim as soon as https://github.com/nodejs/node/pull/65042 is fixed and uploaded to Docker hub
208+
FROM node:24.18.1-slim AS cli
206209
LABEL org.opencontainers.image.source="https://github.com/karakeep-app/karakeep"
207210
WORKDIR /app
208211

@@ -217,7 +220,8 @@ ENTRYPOINT ["node", "index.mjs"]
217220

218221
################# MCP server ##############
219222

220-
FROM node:24-slim AS mcp
223+
# Replace with node:24-slim as soon as https://github.com/nodejs/node/pull/65042 is fixed and uploaded to Docker hub
224+
FROM node:24.18.1-slim AS mcp
221225
LABEL org.opencontainers.image.source="https://github.com/karakeep-app/karakeep"
222226
WORKDIR /app
223227

0 commit comments

Comments
 (0)