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