Fix node.js error in docker runtime, speed up build by not copying the entire context

This commit is contained in:
Benjamin Bach
2022-08-23 23:29:24 +02:00
parent 83e122054c
commit 208c84d427
3 changed files with 382 additions and 362 deletions

View File

@@ -16,7 +16,8 @@ RUN pip install pip --upgrade
RUN mkdir -p /project/src/ &&\
mkdir -p /project/docs/ &&\
mkdir -p /project-static-copy
mkdir -p /project-minimal-copy/sphinx_rtd_theme &&\
touch /project-minimal-copy/sphinx_rtd_theme/__init__.py
WORKDIR /project
@@ -36,9 +37,9 @@ RUN npm install --package-lock-only &&\
# This is strictly speaking not necessary, just makes
# running the container faster...
# Install dependencies, then uninstall project itself
COPY . /project-static-copy
RUN cd /project-static-copy &&\
# Install dependencies, then uninstall project itsel
COPY setup.py README.rst /project-minimal-copy/
RUN cd /project-minimal-copy &&\
pip install ".[dev]" &&\
/usr/bin/yes | pip uninstall sphinx_rtd_theme