Skip to content

Commit 2e73735

Browse files
authored
Ap 226: Update Framework's Dockerfile to use the most recent Node LTS (#15)
1 parent 17bbc97 commit 2e73735

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

Dockerfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,19 @@ RUN apt-get install -y --no-install-recommends \
4545

4646
# Add Node.js package repository (version 16 LTS release) & install Node.js
4747
# -- note that the Node.js setup script takes care of updating the package list
48-
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
48+
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
4949
&& apt-get install -y --no-install-recommends nodejs
5050

51-
# Add Yarn package repository, update package list, & install Yarn
52-
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \
53-
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list \
54-
&& apt-get update -qq \
55-
&& apt-get install -y --no-install-recommends yarn
51+
# Use Yarn via Corepack to avoids using reops and GPG keys
52+
RUN corepack enable \
53+
&& corepack prepare yarn@stable --activate \
54+
&& yarn -v
5655

5756
# Remove packages we only needed as part of the Node.js / Yarn repository
5857
# setup and installation -- note that the Node.js setup scripts installs
5958
# a full version of Python, but at runtime we only need a minimal version
60-
RUN apt-mark manual python3-minimal \
61-
&& apt-get autoremove --purge -y \
62-
curl \
63-
python3
59+
60+
RUN apt-get autoremove --purge -y curl
6461

6562
# ------------------------------------------------------------
6663
# Run configuration

0 commit comments

Comments
 (0)