-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
31 lines (24 loc) · 982 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# ----------------------------------------------------------------------
# Compiling documentation
# ----------------------------------------------------------------------
FROM mambaorg/micromamba AS builder
USER root
# install packages
WORKDIR /src
COPY requirements.txt .
ENV PATH "$MAMBA_ROOT_PREFIX/bin:$PATH"
RUN micromamba install -y -n base -c conda-forge \
beautifulsoup4 \
sphinx sphinx_rtd_theme \
-f requirements.txt
# copy code and generate documentation
COPY . ./
RUN sphinx-build -v -b html docs/source docs/build
# Run the insert_ga_to_header.py script to insert Google Analytics code
RUN python /src/docs/source/insert_ga_to_header.py
# ----------------------------------------------------------------------
# Building actual container
# ----------------------------------------------------------------------
FROM nginx
COPY --from=builder /src/docs/build/ /usr/share/nginx/html/doc/pyincore/
COPY config /usr/share/nginx/html/doc/pyincore/config