Skip to content

Commit 9b8eb75

Browse files
authored
docker: Install Node.js in a non-deprecated way (InfiniTimeOrg#1849)
1 parent b191a30 commit 9b8eb75

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docker/Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
FROM ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG NODE_MAJOR=20
45
RUN apt-get update -qq \
6+
&& apt-get install -y ca-certificates curl gnupg \
7+
&& mkdir -p /etc/apt/keyrings \
8+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
9+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
10+
&& apt-get update -qq \
511
&& apt-get install -y \
612
# x86_64 / generic packages
713
bash \
814
build-essential \
915
cmake \
1016
git \
1117
make \
18+
nodejs \
1219
python3 \
1320
python3-pip \
1421
python3-pil \
1522
python-is-python3 \
1623
tar \
1724
unzip \
1825
wget \
19-
curl \
2026
# aarch64 packages
2127
libffi-dev \
2228
libssl-dev \
@@ -29,8 +35,6 @@ RUN apt-get update -qq \
2935
libpango-1.0-0 \
3036
ibpango1.0-dev \
3137
libpangocairo-1.0-0 \
32-
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
33-
&& apt-get install -y nodejs \
3438
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*;
3539

3640
# Git needed for PROJECT_GIT_COMMIT_HASH variable setting

0 commit comments

Comments
 (0)