ffd
This commit is contained in:
18
Dockerfile
18
Dockerfile
@ -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 a reliable mirror
|
# Configure apk to use Alpine 3.16 repositories
|
||||||
RUN echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/main" > /etc/apk/repositories && \
|
RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.16/main" > /etc/apk/repositories && \
|
||||||
echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/community" >> /etc/apk/repositories
|
echo "https://dl-cdn.alpinelinux.org/alpine/v3.16/community" >> /etc/apk/repositories
|
||||||
|
|
||||||
# Install build dependencies
|
# Update package index and install build dependencies
|
||||||
RUN apk add --no-cache \
|
RUN apk update && 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
|
||||||
|
|||||||
Reference in New Issue
Block a user