Couchbase SDK on Node docker

Hi,
I’m trying to use couchbase node.js SDK within a container.

I’ve tried starting from node-10 node-slim and node-alpine and always getting the same error:

17:21:12 gyp ERR! stack Error: read ECONNRESET 17:21:12 gyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) 17:21:12 gyp ERR! System Linux 3.10.0-1062.4.3.el7.x86_64 17:21:12 gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” 17:21:12 gyp ERR! cwd /usr/src/app/node_modules/couchbase 17:21:12 gyp ERR! node -v v10.19.0 17:21:12 gyp ERR! node-gyp -v v5.0.5 17:21:12 gyp ERR! not ok

Also tried adding this to the dockerfile without success:
RUN apk --no-cache add --virtual native-deps
g++ gcc libgcc libstdc++ linux-headers make python &&
npm install --quiet node-gyp -g

How can I use couchbase on node.js image built on linux? locally on windows it works fine.

Hey @maimon51,

It looks like this error is not related to the SDK at all, but some failure in node-gyp itself related to a network issue with the container. Are you able to confirm that you are able to connect to the internet from inside the container?

Cheers, Brett