refactor(docker): switch to node:24-bookworm-slim base image

Replace debian:bookworm-slim with node:24-bookworm-slim to:
- Use latest Node.js 24 LTS and npm
- Fix npm version compatibility issues (npm@11 requires node >=20.17)
- Simplify Dockerfile by removing nodejs/npm installation
- Better optimization from official Node.js image

Changes:
- Dockerfile.full: use node:24-bookworm-slim base
- Remove nodejs, npm installation steps
- Remove npm upgrade step (included in base image)
- Update Makefile descriptions to reflect Node.js 24
This commit is contained in:
yuchou87
2026-02-16 15:40:07 +08:00
parent ce3fc4bc67
commit 51ed54a414
2 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -16,22 +16,19 @@ COPY . .
RUN make build
# ============================================================
# Stage 2: Debian-based runtime with full MCP support
# Stage 2: Node.js-based runtime with full MCP support
# ============================================================
FROM debian:bookworm-slim
FROM node:24-bookworm-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
nodejs \
npm \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g npm@latest
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
+2 -2
View File
@@ -145,9 +145,9 @@ docker-build:
@echo "Building minimal Docker image (Alpine-based)..."
docker-compose build
## docker-build-full: Build Docker image with full MCP support (Debian-based)
## docker-build-full: Build Docker image with full MCP support (Node.js 24)
docker-build-full:
@echo "Building full-featured Docker image (Debian-based)..."
@echo "Building full-featured Docker image (Node.js 24)..."
docker-compose -f docker-compose.full.yml build
## docker-test: Test MCP tools in Docker container