dup
This commit is contained in:
20
Dockerfile
20
Dockerfile
@ -1,13 +1,21 @@
|
|||||||
# Build stage
|
# Build stage
|
||||||
FROM python:3.9-slim AS builder
|
FROM python:3.9-slim AS builder
|
||||||
|
|
||||||
# Install build dependencies
|
# Set environment variables to avoid interactive prompts
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
gcc \
|
|
||||||
python3-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# 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 \
|
RUN pip install --no-cache-dir \
|
||||||
mkdocs==1.6.1 \
|
mkdocs==1.6.1 \
|
||||||
mkdocs-material==9.5.39 \
|
mkdocs-material==9.5.39 \
|
||||||
|
|||||||
@ -5,7 +5,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: mkdocs-material-prod
|
image: mkdocs-material-prod:latest
|
||||||
ports:
|
ports:
|
||||||
- "8085:80"
|
- "8085:80"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user