From aae902318294f767de531393a631deabb3ad5646 Mon Sep 17 00:00:00 2001 From: govardhan Date: Thu, 19 Jun 2025 21:19:59 +0530 Subject: [PATCH] fdf --- Dockerfile | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb24738..e6a8810 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,23 @@ # Build stage -FROM python:3.9-alpine3.16 AS builder +FROM python:3.9-slim AS builder # Set environment variables to avoid interactive prompts ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 + PYTHONUNBUFFERED=1 \ + DEBIAN_FRONTEND=noninteractive -# 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 - -# Update package index and install build dependencies -RUN apk update && apk add --no-cache \ +# Update package lists and install build dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ - musl-dev \ - python3-dev \ + g++ \ + libc6-dev \ libffi-dev \ - openssl-dev \ + libssl-dev \ make \ - g++ + && rm -rf /var/lib/apt/lists/* + +# Upgrade pip to latest version +RUN pip install --upgrade pip # Install MkDocs and plugins with exact versions RUN pip install --no-cache-dir \ @@ -39,7 +39,12 @@ COPY docs/ ./docs/ RUN mkdocs build --strict # Runtime stage -FROM python:3.9-alpine3.16 +FROM python:3.9-slim + +# Install wget for healthcheck +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /site