This commit is contained in:
govardhan
2025-06-19 20:49:49 +05:30
parent bef993ec29
commit 4ef34483bd
2 changed files with 15 additions and 7 deletions

View File

@ -1,13 +1,21 @@
# Build stage
FROM python:3.9-slim AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install MkDocs and plugins with exact versions for faster resolution
# Update package sources to use a faster mirror
RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list && \
echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list
# Install build dependencies with retries and cleanup
RUN apt-get update -o Acquire::Retries=3 && \
apt-get install -y --no-install-recommends \
gcc=4:12.2.0-3 \
python3-dev=3.11.2-1+b1 && \
rm -rf /var/lib/apt/lists/*
# Install MkDocs and plugins with exact versions
RUN pip install --no-cache-dir \
mkdocs==1.6.1 \
mkdocs-material==9.5.39 \