Update Containerfile.base to Node 20 (#20450)

This commit is contained in:
Mac Siri 2023-12-13 15:17:57 -05:00 committed by GitHub
parent adfd76feb6
commit d2a4216e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,14 +2,16 @@ ARG RUBY_VERSION=3.2.0
ARG DEBIAN_VERSION=bullseye ARG DEBIAN_VERSION=bullseye
FROM public.ecr.aws/docker/library/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} AS ruby-upstream FROM public.ecr.aws/docker/library/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} AS ruby-upstream
ARG NODE_MAJOR=20
ARG YARN_VERSION=1
RUN apt update && \ RUN apt update && \
apt install -y \ apt install -y \
curl \ curl \
software-properties-common \
gnupg2 \ gnupg2 \
&& \ && \
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \ echo "deb https://deb.nodesource.com/node_${NODE_MAJOR}.x $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/nodesource.list && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt update && \ apt update && \
apt install -y \ apt install -y \
imagemagick \ imagemagick \
@ -19,8 +21,9 @@ RUN apt update && \
postgresql-client \ postgresql-client \
tzdata \ tzdata \
nodejs \ nodejs \
yarn \
&& \ && \
apt clean apt clean
RUN npm install -g yarn@$YARN_VERSION
CMD [ "/usr/local/bin/irb" ] CMD [ "/usr/local/bin/irb" ]