Skip to content

Commit

Permalink
Merge pull request #47459 from Shopify/dockerfile-no-version-manager
Browse files Browse the repository at this point in the history
Don't use a full blown version manager to install nodejs
  • Loading branch information
byroot committed Feb 22, 2023
2 parents 5594c6c + 5606a7f commit b3770a0
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -23,9 +23,11 @@ RUN apt-get update -qq && \
# Install JavaScript dependencies
ARG NODE_VERSION=<%= dockerfile_node_version %>
ARG YARN_VERSION=<%= dockerfile_yarn_version %>
ENV VOLTA_HOME="/usr/local"
RUN curl https://get.volta.sh | bash && \
volta install node@$NODE_VERSION yarn@$YARN_VERSION

RUN git clone https://github.com/nodenv/node-build.git /tmp/node-build/ && \
/tmp/node-build/bin/node-build "${NODE_VERSION}" /usr/local && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build

<% end -%>
# Install application gems
Expand Down

0 comments on commit b3770a0

Please sign in to comment.