diff --git a/Dockerfile b/Dockerfile index 430bc5d..87b8492 100644 --- a/Dockerfile +++ b/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 \ diff --git a/docker-compose.yml b/docker-compose.yml index e3a28f7..5d805c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: . dockerfile: Dockerfile - image: mkdocs-material-prod + image: mkdocs-material-prod:latest ports: - "8085:80" volumes: