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:
parent
4113190c2a
commit
e38364b08a
1 changed files with 3 additions and 5 deletions
|
|
@ -18,17 +18,15 @@ RUN make build
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Stage 2: Node.js-based runtime with full MCP support
|
# Stage 2: Node.js-based runtime with full MCP support
|
||||||
# ============================================================
|
# ============================================================
|
||||||
FROM node:24-bookworm-slim
|
FROM node:24-alpine3.23
|
||||||
|
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apk add --no-cache \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
py3-pip
|
||||||
python3-venv \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install uv and symlink to system path
|
# Install uv and symlink to system path
|
||||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue