Docker 节点流箱 libelf.so.1 未找到 (gitlab ci)
Docker node flow-bin libelf.so.1 not found (gitlab ci)
同时 运行ning FlowJS 检查
node_modules/.bin/flow check
inside docker 图片基于 node:latest
(当前为 6.5)
您看到错误
$ npm i
...
npm info lifecycle flow-bin@0.31.1~postinstall: flow-bin@0.31.1
> flow-bin@0.31.1 postinstall .../node_modules/flow-bin
> node lib/install.js
✖ The `.../node_modules/flow-bin/vendor/flow` binary doesn't seem to work correctly
✖ flow binary test failed
...
$ node_modules/.bin/flow check
.../node_modules/flow-bin/vendor/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
ERROR: Build failed: exit code 1
例如flow
不能运行原版node:latest
docker图片
相关问题https://github.com/facebook/flow/issues/210
如果您的图片来自 node:latest
(隐藏在 debian:jessie
中)
您需要对 apt
:
添加一点更新
$ apt-get update -qq
$ apt-get install -qy libelf1
在任何运行之前(例如在Dockerfile
或.gitlab-ci.yml
的相应部分)
同时 运行ning FlowJS 检查
node_modules/.bin/flow check
inside docker 图片基于 node:latest
(当前为 6.5)
您看到错误
$ npm i
...
npm info lifecycle flow-bin@0.31.1~postinstall: flow-bin@0.31.1
> flow-bin@0.31.1 postinstall .../node_modules/flow-bin
> node lib/install.js
✖ The `.../node_modules/flow-bin/vendor/flow` binary doesn't seem to work correctly
✖ flow binary test failed
...
$ node_modules/.bin/flow check
.../node_modules/flow-bin/vendor/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
ERROR: Build failed: exit code 1
例如flow
不能运行原版node:latest
docker图片
相关问题https://github.com/facebook/flow/issues/210
如果您的图片来自 node:latest
(隐藏在 debian:jessie
中)
您需要对 apt
:
$ apt-get update -qq
$ apt-get install -qy libelf1
在任何运行之前(例如在Dockerfile
或.gitlab-ci.yml
的相应部分)