Fix: memory / Add: libsqlite3-dev(apt-get) / Add: run as root / Chg:

node-24.12.0 > node-20-lts
This commit is contained in:
2025-12-18 17:06:40 +09:00
parent ef75c995be
commit c8922ac2af
2 changed files with 10 additions and 1 deletions
+10 -1
View File
@@ -1,13 +1,17 @@
# Load Node.js
FROM --platform=$BUILDPLATFORM node:24.12.0-bullseye-slim
FROM --platform=$BUILDPLATFORM node:20-bullseye-slim
# Set working directory
WORKDIR /app
# Run as root
USER root
# Install packages
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y python3
RUN apt-get install -y libsqlite3-dev
RUN rm -rf /var/lib/apt/lists/*
# Copy package.json
@@ -19,6 +23,11 @@ RUN npm ci --unsafe-perm
# Copy source
COPY ./src ./
# Copy default memory
RUN if [ ! -s /app/memory.db ]; then \
cp /app/memory.default.db /app/memory.db; \
fi
# Create replied_ids.json
RUN touch replied_ids.json