Skip to content
Snippets Groups Projects
Dockerfile 625 B
Newer Older
Hugo NOUTS's avatar
Hugo NOUTS committed

FROM python:3.12-alpine AS builder
Hugo NOUTS's avatar
Hugo NOUTS committed

# Set build directory
WORKDIR /app

# add the current directory to the container as /app
ADD . /app
Hugo NOUTS's avatar
Hugo NOUTS committed

RUN apk update

RUN apk add git

Hugo NOUTS's avatar
Hugo NOUTS committed
# Perform build and cleanup artifacts
Hugo NOUTS's avatar
Hugo NOUTS committed
RUN apk add --no-cache --virtual .build gcc musl-dev && pip install -r ./requirements/docs.txt && apk del .build gcc musl-dev
Hugo NOUTS's avatar
Hugo NOUTS committed

# build the documentation site
RUN mkdocs build

# Expose MkDocs development server port
FROM nginxinc/nginx-unprivileged:1.25
RUN rm -rf /etc/nginx/html/* 
Hugo NOUTS's avatar
Hugo NOUTS committed
COPY --from=builder /app/site /usr/share/nginx/html
RUN ls -l /usr/share/nginx/html
Hugo NOUTS's avatar
Hugo NOUTS committed

CMD ["nginx", "-g", "daemon off;"]