Error with level on docker
See original GitHub issueHi, I’m using level in one of my app, it work nicely when I run it on my mac using nodejs v0.12.2 but when I run it in Docker using the official node image with v0.12.2 I have this error when I launch the app.
scrap_1 | /app/node_modules/level/node_modules/leveldown/node_modules/bindings/bindings.js:83
scrap_1 | throw e
scrap_1 | ^
scrap_1 | Error: /app/node_modules/level/node_modules/leveldown/build/Release/leveldown.node: invalid ELF header
scrap_1 | at Error (native)
scrap_1 | at Module.load (module.js:355:32)
scrap_1 | at Function.Module._load (module.js:310:12)
scrap_1 | at Module.require (module.js:365:17)
scrap_1 | at require (module.js:384:17)
scrap_1 | at bindings (/app/node_modules/level/node_modules/leveldown/node_modules/bindings/bindings.js:76:44)
scrap_1 | at Object.<anonymous> (/app/node_modules/level/node_modules/leveldown/index.js:1:99)
scrap_1 | at Module._compile (module.js:460:26)
scrap_1 | at Object.Module._extensions..js (module.js:478:10)
scrap_1 | at Module.load (module.js:355:32)
soccerscrap_scrap_1 exited with code 1
I search where the error can come from but I don’t find anything
Thanks for your help.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
log-level with docker-compose always fails · Issue #1891
Install Docker Compose version 2.0. · Run docker-compose --log-level WARNING ps · Observe that the following error is returned: Unable to parse ......
Read more >Docker daemon logging level is set to 'info' - Datadog Docs
Setting up an appropriate log level configures the Docker daemon to log events that you would want to review later. A base log...
Read more >Troubleshoot volume errors - Docker Documentation
This topic discusses errors which may occur when you use Docker volumes or bind mounts. Error: Unable to remove filesystem. Some container-based utilities, ......
Read more >How to send log level in docker-compose.yml for 2.0 keep ...
2019/11/30 02:34:05 command traefik error: failed to decode configuration from flags: field not found, node: logLevel version: '3' services: ...
Read more >executor=docker on windows server fails with level=error msg ...
executor=docker on windows server fails with level=error msg="Handler for POST /containers/create returned error: invalid --net: " ...
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 FreeTop 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
Top GitHub Comments
When Docker build the image following my Dockerfile it add the package.json in the container and run npm install :
So now I have a node_modules in my container, and after that I add all my current directory in the container :
And here is the problem because in my current directory I already had a node_modules directory so when I add it I overwrite the node_modules directory that is in the container.
So I have to ignore my node_modules diretory with the .dockerignore file
@mcollina Thanks a lot ! It worked ! I didn’t know the existence of the .dockerignore file ! Thanks @ralphtheninja for your help !