testcafe/testcafe-base alpine映像无法在docker中运行msnodesqlv8



你好,我正在对接我的testcafe项目,我的package.json有一个安装msnodesqlv8的依赖项。看起来我的docker文件失败了,我做错了什么?

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

我的Dockerfile如下,我做错了什么?docker为什么失败了?

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

错误消息显示缺少"make"实用程序。尝试使用以下命令安装:

RUN apk install build-essential

最新更新