Skip to content

Commit 955b7d0

Browse files
authored
Merge pull request #41 from manics/npm-lock
Pin configurable-http-proxy dependencies
2 parents a657dc4 + 9a4f13b commit 955b7d0

File tree

3 files changed

+619
-2
lines changed

3 files changed

+619
-2
lines changed

base/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,17 @@ RUN apt-get update -qq \
7575
nodejs \
7676
npm \
7777
&& locale-gen $LC_ALL \
78-
&& npm install -g configurable-http-proxy@^4.6.2 \
7978
# clean cache and logs
80-
&& rm -rf /var/lib/apt/lists/* /var/log/* /var/tmp/* ~/.npm
79+
&& rm -rf /var/lib/apt/lists/* /var/log/* /var/tmp/*
80+
81+
# Install configurable-http-proxy, but pin all dependencies
82+
# Note npm install -g doesn't work with package.json so do it manually
83+
COPY package-lock.json package.json /usr/local/lib/
84+
RUN cd /usr/local/lib \
85+
&& npm install \
86+
&& ln -s ../lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy /usr/local/bin/ \
87+
&& rm -rf ~/.npm
88+
8189
# install the wheels we built in the previous stage
8290
RUN --mount=type=cache,from=wheel-builder,source=/src/jupyterhub/wheelhouse,target=/tmp/wheelhouse \
8391
# always make sure pip is up to date!

0 commit comments

Comments
 (0)