I am trying to build a docker image through Jenkins using Centos 8 as base. My Dockerfile looks like this (only relevant lines are included):
RUN yum update -y \
&& curl -sL https://rpm.nodesource.com/setup_current.x | bash - \
&& yum install -y nodejs unzip sudo numactl-libs libnsl libaio \
Build is failing with below error:
--> Finished Dependency Resolution
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libm.so.6(GLIBC_2.27)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libc.so.6(GLIBC_2.28)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
It seems like since the node version is not specified in dockerfile, the latest node version (18.7.0) is being installed and hence some dependencies are not found. Last build (few months back) had node v17. If this is the root cause, can someone help me with suggestions on how this can be fixed.