-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add node:22.6.0 and yarn:1.22.22 to dockerfiles
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
ARG RUBY_VERSION=3.3.4 | ||
FROM ruby:${RUBY_VERSION} | ||
|
||
ARG NODE_VERSION=v22.6.0 | ||
ARG YARN_VERSION=1.22.22 | ||
|
||
RUN curl -fsSL https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz \ | ||
-o /tmp/node-$NODE_VERSION-linux-x64.tar.gz \ | ||
&& tar -xzvf /tmp/node-$NODE_VERSION-linux-x64.tar.gz -C /usr/local \ | ||
&& rm -rf /tmp/node-$NODE_VERSION-linux-x64.tar.gz | ||
|
||
ENV PATH=/usr/local/node-$NODE_VERSION-linux-x64/bin:$PATH | ||
|
||
RUN npm install -g yarn@$YARN_VERSION | ||
|
||
ARG RAILS_VERSION | ||
# Install Rails based on the version specified but if not specified, install the latest version. | ||
RUN if [ -z "$RAILS_VERSION" ] ; then gem install rails ; else gem install rails -v $RAILS_VERSION ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
ARG RUBY_VERSION=3.3.4 | ||
FROM ruby:${RUBY_VERSION} | ||
|
||
ARG USER_ID=1000 | ||
ARG GROUP_ID=1000 | ||
RUN groupadd -g $GROUP_ID app && useradd -u $USER_ID -g app -m app | ||
|
||
ARG NODE_VERSION=v22.6.0 | ||
ARG YARN_VERSION=1.22.22 | ||
|
||
RUN curl -fsSL https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz \ | ||
-o /tmp/node-$NODE_VERSION-linux-x64.tar.gz \ | ||
&& tar -xzvf /tmp/node-$NODE_VERSION-linux-x64.tar.gz -C /usr/local \ | ||
&& rm -rf /tmp/node-$NODE_VERSION-linux-x64.tar.gz | ||
|
||
ENV PATH=/usr/local/node-$NODE_VERSION-linux-x64/bin:$PATH | ||
|
||
RUN npm install -g yarn@$YARN_VERSION | ||
|
||
USER app | ||
|
||
ARG RAILS_VERSION | ||
# Install Rails based on the version specified but if not specified, install the latest version. | ||
RUN if [ -z "$RAILS_VERSION" ] ; then gem install rails ; else gem install rails -v $RAILS_VERSION ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters