FROM python:3.8.3-slim as builder

# Set build directory
WORKDIR /app

# RUN pip install mkdocs && pip install mkdocs-material && pip install plantuml-markdown
COPY requirements.txt .

RUN pip install -r requirements.txt

# add the current directory to the container as /app
ADD . /app

# build the documentation site
RUN mkdocs build

FROM nginx

COPY --from=builder /app/site /usr/share/nginx/html
RUN ls -l /usr/share/nginx/html
EXPOSE 80

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