diff --git a/Dockerfile b/Dockerfile index 64c944a..8af73ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,13 @@ ARG RUBY_VERSION=3.4.1 FROM ruby:${RUBY_VERSION} -ARG NODE_VERSION=v22.6.0 +ARG NODE_VERSION=22 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 +RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \ + && apt-get update \ + && apt-get install --yes --no-install-recommends nodejs \ + && npm install -g yarn@$YARN_VERSION ARG RAILS_VERSION # Install Rails based on the version specified but if not specified, install the latest version. diff --git a/Dockerfile.unix b/Dockerfile.unix index 6cf3348..e8df6a9 100644 --- a/Dockerfile.unix +++ b/Dockerfile.unix @@ -6,17 +6,13 @@ ARG GROUP_ID=1000 RUN (getent group $GROUP_ID > /dev/null || groupadd -g $GROUP_ID app) && \ (getent passwd $USER_ID > /dev/null || useradd -u $USER_ID -g $GROUP_ID -m app) -ARG NODE_VERSION=v22.6.0 +ARG NODE_VERSION=22 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 +RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \ + && apt-get update \ + && apt-get install --yes --no-install-recommends nodejs \ + && npm install -g yarn@$YARN_VERSION USER $USER_ID:$GROUP_ID