Skip to content

Commit

Permalink
Do not install node directly in /usr/local
Browse files Browse the repository at this point in the history
node-build starts by clearing everything.
  • Loading branch information
byroot committed Feb 22, 2023
1 parent 8825a89 commit e03e51e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -24,8 +24,9 @@ RUN apt-get update -qq && \
ARG NODE_VERSION=<%= dockerfile_node_version %>
ARG YARN_VERSION=<%= dockerfile_yarn_version %>

ENV PATH=$PATH:/usr/local/node/bin
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master

Expand Down

0 comments on commit e03e51e

Please sign in to comment.