ibm-messaging / mq-mqi-nodejs

Calling IBM MQ from Node.js - a JavaScript MQI wrapper
Apache License 2.0
79 stars 41 forks source link

Docker image does not work #155

Closed davidrosee closed 1 year ago

davidrosee commented 1 year ago

**Why is a non functional Docker image provided?

Built the image but when I try to run it:**


 *  Executing task: docker run --rm -it  mqmqinodejs:latest 

Cannot find MQ C library.
  System appears to be: linux[arm64]
  Has the MQ C client been installed?
  Have you run setmqenv?
/usr/local/nodejs/mqput/node_modules/ibmmq/lib/mqi.js:450
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/opt/mqm/lib/libmqm_r.so'
    at Object.openSync (node:fs:601:3)
    at readFileSync (node:fs:469:35)
    at new DynamicLibrary (/usr/local/nodejs/mqput/node_modules/ffi-napi/lib/dynamic_library.js:68:23)
    at Object.Library (/usr/local/nodejs/mqput/node_modules/ffi-napi/lib/library.js:47:10)
    at loadLib (/usr/local/nodejs/mqput/node_modules/ibmmq/lib/mqi.js:303:18)
    at loadLibMulti (/usr/local/nodejs/mqput/node_modules/ibmmq/lib/mqi.js:434:13)
    at Object.<anonymous> (/usr/local/nodejs/mqput/node_modules/ibmmq/lib/mqi.js:455:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/opt/mqm/lib/libmqm_r.so'
}

Node.js v18.15.0
chughts commented 1 year ago

That will most likely be because there isn't as yet an MQ redistributable client for linux / arm64.

ibmmqmet commented 1 year ago

As the package README says, the automatic installation of the Redist client is only available for Windows and Linux x64.

For other platforms, you have to provide the MQ client code from your own download, and hence the sample Dockerfiles would need to be modified to copy in the client installation files, and do something like a dnf or apt-get install