Skip to content

Commit 342578d

Browse files
committed
fixed build issue
1 parent 7a6d743 commit 342578d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ RUN apt-get -yq update && \
1414

1515
ADD . /opt/conditional
1616

17-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
18-
apt-get -yq update && \
19-
apt-get -yq install nodejs && \
20-
npm install && \
21-
npm run production && \
22-
rm -rf node_modules && \
17+
ENV NVM_DIR /usr/local/nvm
18+
ENV NODE_VERSION v10.24.1
19+
RUN mkdir -p $NVM_DIR
20+
21+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
22+
23+
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION && npm run production"
24+
25+
RUN rm -rf node_modules && \
2326
apt-get -yq remove nodejs npm && \
2427
apt-get -yq clean all
2528

0 commit comments

Comments
 (0)