Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install not working with podman #994

Closed
repomike opened this issue Apr 22, 2024 · 7 comments
Closed

npm install not working with podman #994

repomike opened this issue Apr 22, 2024 · 7 comments
Labels
Linux Problem in on non-Windows platform

Comments

@repomike
Copy link

repomike commented Apr 22, 2024

Please provide below information while opening an issue to understand your problem

  • Operating System Name where ibm_db is installed: dockerizing using RHEL image: registry.access.redhat.com/ubi8/nodejs-20:1-38.1712567745
  • ibm_db version 3.2.4
  • attempting to build with:
podman build --platform=linux/amd64 --no-cache -t db-test:local -f Dockerfile .

Please provide below problem specific info:

=========================================
We recently switched from docker to podman and trying to build an image for our application based on the RHEL node.js image fails to install ibm_db. The build just hangs on driverInstall.js.

STEP 7/10: RUN npm install --verbose
npm verb cli /usr/bin/node /usr/bin/npm
npm info using npm@10.2.4
npm info using node@v20.11.1
npm verb title npm install
npm verb argv "install" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/opt/app-root/src/.npm/_logs/2024-04-22T13_11_38_968Z-
npm verb logfile /opt/app-root/src/.npm/_logs/2024-04-22T13_11_38_968Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/ibm_db/-/ibm_db-3.2.4.tgz 66179ms (cache miss)
npm info run ibm_db@3.2.4 install node_modules/ibm_db node installer/driverInstall.js

I can verify that a node app builds and runs without ibm_db but we think we've narrowed it down to the exec statement in the driverInstall.js file that can't issue the make command to get the version.

var makeVersion = execSync('make -v').toString();
@repomike
Copy link
Author

Issue could be related to RHEL and podmans extra permissions on selinux:

-rwxr-xr-x. 1 root root system_u:object_r:container_file_t:s0:c530,c693 90900480 Mar  5  2023 /usr/local/bin/node

vs. docker:

-rwxr-xr-x 1 root root ? 90900480 Mar  5  2023 /usr/local/bin/node

@bimalkjha
Copy link
Member

@repomike If execSync() function can't execute make command, then its problem with child_process package and execSync() is part of child_process and ibm_db uses it as an dependency. Are you able to call execSync using a sample nodejs program? Thanks.

@bimalkjha bimalkjha added the Linux Problem in on non-Windows platform label May 3, 2024
@bimalkjha
Copy link
Member

@repomike Any update about this issue? Are you able to call execSync using a sample nodejs program? Thanks.

@repomike
Copy link
Author

repomike commented May 9, 2024

I was able to use the emulator to build and run locally.

$ arch -x86_64

on my mac puts me into a new shell where i can issue the npm install

@bimalkjha
Copy link
Member

@repomike So, finally issue got resolved?

@repomike
Copy link
Author

repomike commented May 9, 2024

I would say so. thanks

@bimalkjha
Copy link
Member

Closing the issue now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux Problem in on non-Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants