Hello I am dockerizing my testcafe project and my package.json has a dependency to install msnodesqlv8. Looks like my docker file is failing , what am i doing wrong here?
deasync@0.1.21 install /app/node_modules/deasync
> node ./build.js
`linux-x64-node-14` exists; testing
Binary is fine; exiting
> msnodesqlv8@2.0.12 install /app/node_modules/msnodesqlv8
> prebuild-install || node-gyp rebuild
prebuild-install WARN install Error loading shared library libmsodbcsql-17.so: N
o such file or directory (needed by /app/node_modules/msnodesqlv8/build/Release/
sqlserverv8.node)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/w
hich/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:6
8:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:8
0:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:1
6
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:183:21)
gyp ERR! System Linux 4.19.76-linuxkit
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gy
p/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/msnodesqlv8
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! msnodesqlv8@2.0.12 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
My Dockerfile is as below, what am i doing wrong here? why is docker failing?
FROM testcafe/testcafe
USER root
WORKDIR /app
COPY .npmrc .npmrc
COPY package*.json ./
RUN apk add --no-cache python3 py3-pip
RUN npm cache verify && npm install
COPY . .
USER user