I’m running my code on Windows 10 x64. The same code is working for me by some additional configurations made to my PC i.e. installing windows-build-tools and node-gyp, configuring node-gyp for python variable and msvs_version to 2017.
Please suggest your ideas so that I can create a docker image from my system and run it.
Thank you
Ankit Lalan
It looks like your Docker environment is not one which we have prebuilds available for, so node-gyp is attempting to build the native part of our library and failing due to missing build dependancies. You can see the required dependencies here:
Thanks @brett19.
I’m using windows 10 and I’m able to install the SDK after multiple configurations updates, mentioned above.
I’m running into trouble when building my package.json using Dockerfile. Package.json contains Couchbase@2.6.10, thus when image is built it errors out.
Do I need to include node-gyp, python and windows-build-tools in my Dockerfile. But this doesn’t make sense as I’ll be running the image on a Centos server and on Centos server I cannot have Microsoft Visual Studio Build tools.
We only have a subset of our supported platforms pre-built with binaries for installation, and it appears that your configuration is not within that subset of platforms. Unfortunately this means you will need to install the build tools in order to build the binaries. Note that it is possible to prebuilt the binaries on one system and deploy this to many, though this is not entirely straightforward to achieve.
Hey @brett19, thanks for your reply.
After brain-storming, I finally found the way to build my “Couchbase SDK” on a windows server using Dockerfile.
Dockerfile
Update the following lines in the Dockerfile will run all the dependencies required for building Couchbase SDK.
1. RUN apk --no-cache add --virtual native-deps g++ gcc libgcc libstdc++ linux-headers make python && npm install --quiet node-gyp -g
2. RUN apk del native-deps
Paste the Line #1 before you have “npm install --production” and then Line #2. Once we have Line #1, it will install all the dependencies required for building Couchbase SDK, then “npm install” will install all the packages required including Couchbase and finally Line #2 will be helpful to remove the dependencies of host system.