@@ -9,38 +9,41 @@ RUN curl --silent --location https://rpm.nodesource.com/setup_20.x | bash -
99
1010{%- if version in ('centos8', 'rockylinux8') %}
1111
12- # Install development tools
13- RUN yum -y module install nodejs:10
12+ # Install node
13+ RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash && \
14+ source ~/.bashrc && \
15+ nvm install 20.8.1 && \
16+ node -v && npm -v
1417
1518# Install python3 for gyp
1619RUN yum -y install python3
1720
1821# Upgrade gyp to a python3 compatible version
19- RUN npm install -g node-gyp@latest
22+ RUN source ~/.bashrc && nvm use 20.8.1 && npm install -g node-gyp@latest
2023
2124{%- endif %}
2225
23- # Install development tools
24- RUN yum -y install nodejs
26+ # Install node
27+ RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash && \
28+ source ~/.bashrc && \
29+ nvm install 20.8.1 && \
30+ node -v && npm -v
2531
2632{% else -%}
2733
2834# Install prerequisites
2935RUN apt-get update && \
3036 DEBIAN_FRONTEND=noninteractive apt-get -y install \
31- build-essential curl gnupg devscripts debhelper dh-make git libicu-dev
37+ build-essential curl gnupg devscripts debhelper dh-make git libicu-dev curl
3238
3339{%- if version in ('focal') %}
3440RUN DEBIAN_FRONTEND=noninteractive apt-get -y install dh-systemd
3541{% endif %}
3642
37- # Add NodeSource repo
38- RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
39-
40- # Install node
41- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs
42-
43- RUN apt-get clean
43+ RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash - && \
44+ . ~/.bashrc && \
45+ nvm install 20.8.1 && \
46+ node -v && npm -v
4447
4548{% endif -%}
4649
0 commit comments