FROM python:3.12-alpine AS builder # Set build directory WORKDIR /app # add the current directory to the container as /app ADD . /app RUN apk update RUN apk add git # Perform build and cleanup artifacts RUN apk add --no-cache --virtual .build gcc musl-dev && pip install -r ./requirements/docs.txt && apk del .build gcc musl-dev # build the documentation site RUN mkdocs build # Expose MkDocs development server port FROM nginxinc/nginx-unprivileged:1.25 RUN rm -rf /etc/nginx/html/* COPY --from=builder /app/site /usr/share/nginx/html RUN ls -l /usr/share/nginx/html EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"]