@@ -4,43 +4,48 @@ FROM {{ dist }}:{{ version }}
44
55RUN yum -y install gcc-c++ make git libicu-devel rpmdevtools
66
7- # Add NodeSource repo
8- RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
9-
10- {%- if version in ('centos8', 'rockylinux8') %}
7+ {%- if version in ('centos9', 'rockylinux9') %}
8+ RUN yum -y install systemd-rpm-macros
9+ {% endif %}
1110
12- # Install development tools
13- RUN yum -y module install nodejs:10
11+ # Install node
12+ RUN yum -y module install nodejs:20
1413
1514# Install python3 for gyp
1615RUN yum -y install python3
1716
1817# Upgrade gyp to a python3 compatible version
1918RUN npm install -g node-gyp@latest
2019
21- {%- endif %}
20+ # Downgrade npm
21+ RUN npm install -g npm@6
2222
23- # Install development tools
24- RUN yum -y install nodejs
23+ # Install node
24+ RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash && \
25+ source ~/.bashrc && \
26+ nvm install 20.8.1 && \
27+ node -v && npm -v
2528
2629{% else -%}
2730
2831# Install prerequisites
2932RUN apt-get update && \
3033 DEBIAN_FRONTEND=noninteractive apt-get -y install \
31- build-essential curl gnupg devscripts debhelper dh-make git libicu-dev
34+ build-essential curl gnupg devscripts debhelper dh-make git libicu-dev curl
3235
3336{%- if version in ('focal') %}
3437RUN DEBIAN_FRONTEND=noninteractive apt-get -y install dh-systemd
3538{% endif %}
3639
3740# Add NodeSource repo
38- RUN curl -sL https://deb.nodesource.com/setup_10 .x | bash -
41+ RUN curl -sL https://deb.nodesource.com/setup_20 .x | bash -
3942
4043# Install node
4144RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs
4245
4346RUN apt-get clean
47+ RUN npm install -g npm@6
48+
4449
4550{% endif -%}
4651
0 commit comments