我正在使用带有s6-overlay的alpine-openjdk映像在docker上运行服务。我正在尝试在同一图像上运行ganache-cli,作为另一服务或作为初始化脚本,但无法使其正常工作。有没有使用s6-overlay运行ganache-cli的示例?
谢谢。
这是我的DockerFile的样子:
FROM smebberson/alpine-openjdk
RUN apk update && apk add nodejs
RUN npm install -g ganache-cli
ADD etc /etc
EXPOSE 8081
ENTRYPOINT ["/init"]
运行ganache-cli和int-init.d
运行图像时出现以下错误:
/usr/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:52
*/var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,o,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var f in r=Object(arguments[s]))a.call(r,f)&&(c[f]=r[f]);if(n){o=n(r);for(var d=0;d<o.length;d++)i.call(r,o[d])&&(c[o[d]]=r[o[d]])}}return c}},function(e,t){e.exports=function(e,t,r){var n=t.
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/ganache-cli/cli.js:12:13)
at Module._compile (module.js:556:32)