build(docker): migrate full image from Debian to Alpine base

Replace node:24-bookworm-slim with node:24-alpine3.23 to reduce
image size and improve build efficiency.

Changes:
- Base image: node:24-bookworm-slim → node:24-alpine3.23
- Package manager: apt-get → apk
- Package names: python3-pip → py3-pip
- Remove python3-venv (included in Alpine Python3)
- Use apk --no-cache for cleaner image layers

Expected benefits:
- Reduce base image size by ~100-200MB (30-40% reduction)
- Faster image pulls and container startup
- Full MCP support maintained (Node.js, Python, uv)

Estimated final image size: ~600-700MB (vs ~800MB before)
This commit is contained in:
yuchou87
2026-02-17 10:57:38 +08:00
parent 4113190c2a
commit e38364b08a
+3 -5
View File
@@ -18,17 +18,15 @@ RUN make build
# ============================================================
# Stage 2: Node.js-based runtime with full MCP support
# ============================================================
FROM node:24-bookworm-slim
FROM node:24-alpine3.23
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apk add --no-cache \
ca-certificates \
curl \
git \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
py3-pip
# Install uv and symlink to system path
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \