Couchnode docker and alpine image

I have a docker image to run node and i have couchbase as one of it’s dependency. Image build fine. Except I’m getting:
app-0 Error: Error loading shared library /usr/src/node-app/node_modules/couchbase/build/Release/couchbase_impl.node: Exec format error

When I attach into the running image and npm install couchbase manually. I can passby the error message.

I can’t see any reason why would the docker build command is building a different version of couchbase native binding? All this is done on the same machine.

Anyone have any success with couchnode and docker?
I am using https://hub.docker.com/r/risingstack/alpine/tags/ as the base image
I’m using mac os x to develop

Thanks in advance!
Andrew

Hey @andrewvmail,

It appears that you are installing the couchnode module using a different platform or binary version of Node.js, and then copying it to another system. Due to the fact that there is an underlying C extension being used, we unfortunately do not support this situation natively, and the module must be reinstalled.

Cheers, Brett

Hi Brett, it turned out the problem was alpine base image is too minimal
for couchbase build process to successfully complete the build. It looked
like I had something but turned out its a half baked artifact. When I use
node base image it worked.

Cheers