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

Hugo NOUTS's avatar
Hugo NOUTS committed
FROM python:3.9-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 nginx

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

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