1

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.

Pavan Kumar
  • 129
  • 7
  • Can you just build your image `FROM node:16` (or `node:18`) instead of trying to rebuild it yourself? Have you figured out which combination of packages causes the problem? Does removing unnecessary tools like `sudo` help at all? – David Maze Aug 16 '22 at 13:46
  • Hi David, Thanks! As of now, I would like to go with centos image and install nodejs on that. – Pavan Kumar Aug 17 '22 at 13:11

0 Answers0