Invalid ELF Header when using Docker
See original GitHub issueI 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)
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Bcrypt: invalid ELF header with Docker and Sails.JS
I was using a Linux Docker image on Windows. Running npm install on Windows synced the files to the Docker image. Deleting node_modules...
Read more >invalid ELF header when I use it on docker · Issue #578 - GitHub
The root cause is => Docker Context. Docker context is copying everything from your root folder to destination container working directory. So ...
Read more >Solved! “invalid ELF header” with Docker and Bcrypt - Medium
The reason this error occurs is because the node module bcrypt is first compiled on your original machine (specific for your OS) and...
Read more >Docker remote debug with native node modules fails with ...
Docker remote debug with native node modules fails with "invalid ELF header" ... with native code (eg. bcrypt) or use the project from...
Read more >Unable to load shared object; invalid ELF header
I am attempting to create a container that runs an R script which calls a .DLL The line in my Rscript uses dyn.load....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.<anonymous> (/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)
Thanks @bimalkjha - working nicely.