Sha256: 17d5c18188c5990841df4bbf6e1ee5eb168a69a1745d42996cd3c55e11a3cbfd

Contents?: true

Size: 950 Bytes

Versions: 2

Compression:

Stored size: 950 Bytes

Contents

<% if node_version and yarn_version -%>
# Install JavaScript dependencies
<% elsif node_version -%>
# Install Node.js
<% elsif yarn_version -%>
# Install yarn
<% end -%>
<% if node_version -%>
ARG NODE_VERSION=<%= node_version %>
<% end -%>
<% if yarn_version -%>
ARG YARN_VERSION=<%= yarn_version %>
<% end -%>
<% if node_version -%>
ENV PATH=/usr/local/node/bin:$PATH
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/node && \
    npm install -g yarn@$YARN_VERSION && \
    rm -rf /tmp/node-build-master
<% end -%>
<% if yarn_version -%>
<% if yarn_version < '2' -%>
RUN npm install -g yarn@$YARN_VERSION
<% else -%>
<% if (node_version.split('.').map(&:to_i) <=> [16,10,0]) < 0 -%>
RUN npm i -g corepack && \
<% else -%>
RUN corepack enable && \
<% end -%>
    corepack prepare yarn@$YARN_VERSION --activate
<% end -%>
<% end -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dockerfile-rails-1.2.1 lib/generators/templates/_install_node.erb
dockerfile-rails-1.2.0 lib/generators/templates/_install_node.erb