mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Fix node.js error in docker runtime, speed up build by not copying the entire context
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -7,4 +7,11 @@ cp -r /project/node_modules /project-working-copy/
|
||||
cd /project-working-copy
|
||||
pip install --upgrade -e ".[dev]"
|
||||
|
||||
# This helps a potential permission issue, but might be removed
|
||||
# pending some more investigation of docker host file system
|
||||
# permissions in the bind mount
|
||||
npm cache clean --force
|
||||
npm install
|
||||
|
||||
echo "Going to invoke: npm run $@"
|
||||
npm run $@
|
||||
|
||||
728
package-lock.json
generated
728
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user