This commit is contained in:
govardhan
2025-06-19 21:18:01 +05:30
parent 70962e3a6c
commit d5f8723766

View File

@ -1,23 +1,23 @@
# Build stage # Build stage
FROM python:3.9-alpine AS builder FROM python:3.9-alpine3.16 AS builder
# Set environment variables to avoid interactive prompts # Set environment variables to avoid interactive prompts
ENV PYTHONDONTWRITEBYTECODE=1 \ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 PYTHONUNBUFFERED=1
# Configure apk to use Alpine 3.16 repositories
RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.16/main" > /etc/apk/repositories && \
echo "https://dl-cdn.alpinelinux.org/alpine/v3.16/community" >> /etc/apk/repositories
# Configure apk to use a reliable mirror # Update package index and install build dependencies
RUN echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/main" > /etc/apk/repositories && \ RUN apk update && apk add --no-cache \
echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/community" >> /etc/apk/repositories
# Install build dependencies
RUN apk add --no-cache \
gcc \ gcc \
musl-dev \ musl-dev \
python3-dev \ python3-dev \
libffi-dev \ libffi-dev \
openssl-dev \ openssl-dev \
make make \
g++
# Install MkDocs and plugins with exact versions # Install MkDocs and plugins with exact versions
RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir \
@ -39,7 +39,7 @@ COPY docs/ ./docs/
RUN mkdocs build --strict RUN mkdocs build --strict
# Runtime stage # Runtime stage
FROM python:3.9-alpine FROM python:3.9-alpine3.16
# Set working directory # Set working directory
WORKDIR /site WORKDIR /site