Sha256: 05c4c2ff449b9f7dd937d91831cfa69242ca4d198002ee3c51674bb1f3a25af8

Contents?: true

Size: 1.03 KB

Versions: 9

Compression:

Stored size: 1.03 KB

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 && \
<% end -%>
<% if yarn_version -%>
<% if yarn_version < '2' -%>
<% if node_version -%>   <% else %>RUN<% end %> npm install -g yarn@$YARN_VERSION<% if node_version -%> && \<% end %>
<% else -%>
<% if (node_version.split('.').map(&:to_i) <=> [16,10,0]) < 0 -%>
    npm i -g corepack && \
<% else -%>
    corepack enable && \
<% end -%>
    corepack prepare yarn@$YARN_VERSION --activate<% if node_version -%> && \<% end %>
<% end -%>
<% end -%>
<% if node_version -%>
    rm -rf /tmp/node-build-master
<% end -%>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dockerfile-rails-1.5.0 lib/generators/templates/_install_node.erb
dockerfile-rails-1.4.2 lib/generators/templates/_install_node.erb
dockerfile-rails-1.4.1 lib/generators/templates/_install_node.erb
dockerfile-rails-1.4.0 lib/generators/templates/_install_node.erb
dockerfile-rails-1.3.0 lib/generators/templates/_install_node.erb
dockerfile-rails-1.2.5 lib/generators/templates/_install_node.erb
dockerfile-rails-1.2.4 lib/generators/templates/_install_node.erb
dockerfile-rails-1.2.3 lib/generators/templates/_install_node.erb
dockerfile-rails-1.2.2 lib/generators/templates/_install_node.erb