From 2aaa9e2e09c786dc3b64d02cc5338855ae65fdb6 Mon Sep 17 00:00:00 2001 From: gugulethu Date: Sat, 21 Jun 2025 22:25:43 +0200 Subject: [PATCH] Update Dockerfile --- Dockerfile | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd4872e..4dd20f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1 @@ -# Use the official Python image as a base -FROM python:3.11-slim AS builder - -# Set the working directory in the container -WORKDIR /app -RUN pwd # Print the current working directory - -# Copy the requirements file -COPY requirements.txt . -RUN pwd # Print the current working directory - -# Install MkDocs and any other dependencies -RUN pip install --no-cache-dir -r requirements.txt -RUN pwd # Print the current working directory - -# Copy the entire MkDocs project into the container -COPY . . -RUN pwd # Print the current working directory - -# Build the MkDocs project -RUN mkdocs build -RUN pwd # Print the current working directory - -# Use Nginx as the web server -FROM nginx:latest -RUN pwd # Print the current working directory - -# Copy the built MkDocs site from the builder stage -COPY --from=builder /app/site /usr/share/nginx/html -RUN pwd # Print the current working directory - -# Copy custom Nginx configuration file (if needed) -COPY nginx.conf /etc/nginx/conf.d/default.conf -RUN pwd # Print the current working directory - -# Expose port 80 -EXPOSE 80 - -# Start Nginx -CMD ["nginx", "-g", "daemon off;"] +FROM python:3.11-slim WORKDIR /app COPY --from=builder /app/site /app EXPOSE 8000 CMD ["python3", "-m", "http.server", "8000", "--directory", "/app"] \ No newline at end of file