在〜/ cypress-dockerfile路径中,我有以下Dockerfile:
FROM cypress/base:10
RUN npm install --save-dev cypress
WORKDIR /node_modules
RUN npm install sqlite3
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
然后我运行docker build .
,但是它停止了以下操作:
Step 4/6 : RUN npm install sqlite3
---> Running in 13de6b7a4fcf
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
> sqlite3@5.0.0 install /node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: not found
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sqlite3@5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sqlite3@5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-08-07T13_28_54_118Z-debug.log
The command '/bin/sh -c npm install sqlite3' returned a non-zero code: 1
我认为我可能在错误的目录中,但是我不确定,任何帮助都将不胜感激。