diff --git a/docker/Dockerfile b/docker/Dockerfile index 380816d..880ca5a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,13 +25,16 @@ RUN apk add --update \ build-base \ libffi-dev cairo-dev cairo cairo-tools \ jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev -RUN pip install --upgrade pip \ - pip install -r /mkdocs/requirements.txt \ - # pip install mkdocs==${MKDOCS_VERSION} && \ - # pip install mkdocs-material && \ - # pip install mkdocs-img2fig-plugin && \ - cd /bootstrap && pip install -e /bootstrap \ - rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* \ + +RUN python -m venv /src/env +# Enable venv +ENV PATH="/src/env/bin:$PATH" + +RUN \ + pip install --upgrade pip && \ + pip install --ignore-installed -r /src/requirements.txt && \ + cd /bootstrap && pip install -e /bootstrap && \ + rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* && \ chmod 600 /root/.ssh/config CMD ["/usr/bin/bootstrap", "start"] @@ -39,6 +42,7 @@ CMD ["/usr/bin/bootstrap", "start"] FROM builder as makestatic ADD docs /src/docs/ ADD mkdocs.yml /src/ +ENV PATH="/src/env/bin:$PATH" RUN cd /src && mkdocs build FROM nginx