ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
189 stars 151 forks source link

Invalid ELF Header when using Docker #68

Closed neurotech closed 8 years ago

neurotech commented 8 years ago

I am trying to use node-ibm_db in a Docker container. The module installs OK, and successfully runs and completes the installer/driverInstall.js script.

When I try to run my application in the Docker container, I get the following error:

/usr/src/app/node_modules/node-edumate/node_modules/ibm_db/node_modules/bindings/bindings.js:79
        throw e
        ^

Error: /usr/src/app/node_modules/node-edumate/node_modules/ibm_db/build/Release/odbc_bindings.node: invalid ELF header
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/usr/src/app/node_modules/node-edumate/node_modules/ibm_db/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/usr/src/app/node_modules/node-edumate/node_modules/ibm_db/lib/odbc.js:27:31)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/src/app/node_modules/node-edumate/lib/edumate.js:3:11)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
smartmouse commented 8 years ago

which OS are you using? Are you using 64 bit docker node environment? What node version are you using?

neurotech commented 8 years ago

I am using Debian (Jessie) 64 bit on node 4.1.2

neurotech commented 8 years ago

This is my Dockerfile:

https://gist.github.com/neurotech/03147c2a22e4754e8a67

bimalkjha commented 8 years ago

@neurotech Try now. This issue is fixed.

neurotech commented 8 years ago

Thanks @bimalkjha - working nicely.

skywritergr commented 8 years ago

Unfortunately I'm faced with the same issue. I'm using docker node ( https://github.com/nodejs/docker-node/blob/0f898d6da852108defeab98780f1945cecce9465/4.3/wheezy/Dockerfile ) as my base and the latest version of the ibm_db driver.

My node version is 4.3.1

Here's my Dockerfile: https://gist.github.com/skywritergr/f46d6c104c49f828c321

And this is the error I get when i'm trying to start my docker image:

Error: /src/node_modules/ibm_db/build/Release/odbc_bindings.node: invalid ELF header at Error (native) at Object.Module._extensions..node (module.js:434:18) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at bindings (/src/node_modules/ibm_db/node_modules/bindings/bindings.js:74:15) at Object. (/src/node_modules/ibm_db/lib/odbc.js:27:31) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)