Revert to previous working dockerfile

This commit is contained in:
gugulethu 2025-06-20 18:28:55 +02:00
commit 8f7580094c

View file

@ -1,39 +1,20 @@
# ───────────────────────────────────────────────────────
# 1) Build stage: install MkDocs & compile your site
# ───────────────────────────────────────────────────────
FROM python:3.11-slim AS builder
# prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Use the official Python image as a base
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# copy & install dependencies
# Copy the requirements file if you have one
COPY requirements.txt .
# Install MkDocs and any other dependencies
RUN pip install --no-cache-dir -r requirements.txt
# copy our doc sources & build
# Copy the entire MkDocs project into the container
COPY . .
# note: if you need a custom config or extra flags, adjust here
RUN mkdocs build
# ───────────────────────────────────────────────────────
# 2) Run stage: serve the built site via nginx
# ───────────────────────────────────────────────────────
FROM nginx:alpine
# remove default nginx html
RUN rm -rf /usr/share/nginx/html/*
# copy over our static site from the builder
COPY --from=builder /app/site/ /usr/share/nginx/html/
# (optional) if you have a custom nginx.conf, uncomment:
# COPY nginx.conf /etc/nginx/nginx.conf
# expose HTTP
# Expose the port that MkDocs will run on
EXPOSE 80
# run nginx in foreground
CMD ["nginx", "-g", "daemon off;"]
# Command to run MkDocs
CMD ["mkdocs", "build"]