dup
This commit is contained in:
20
Dockerfile
20
Dockerfile
@ -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 \
|
||||
|
||||
@ -5,7 +5,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: mkdocs-material-prod
|
||||
image: mkdocs-material-prod:latest
|
||||
ports:
|
||||
- "8085:80"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user