我对谷歌云消息传递概念非常陌生,并希望尝试使用Playground示例应用程序但是甚至无法让start.sh脚本在docker机器中正常运行。我也没有使用docker的经验,但是在安装和设置默认的docker机器时做了所有要求。 我正在尝试做的是进入start.sh脚本所在的gcm-playground的父文件夹(这是从Docker Quickstart终端完成的)并执行./start.sh。
我收到以下错误:
./start.sh
==> Working in web/
==> Install gulp
./start.sh: line 31: sudo: command not found
==> Install bower
./start.sh: line 38: sudo: command not found
==> Install npm dependencies
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-cssmin requires gulp-rename@'~1.1.0' but will load
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-rename,
npm WARN unmet dependency which is version 1.2.2
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-autoprefixer\node_modules\gulp-util requires object-assign@'^3.0.0' but will load
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-autoprefixer\node_modules\object-assign,
npm WARN unmet dependency which is version 2.1.1
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-autoprefixer\node_modules\gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-autoprefixer\node_modules\through2,
npm WARN unmet dependency which is version 0.6.5
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-minify-html\node_modules\gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency C:\Users\my-PC\Documents\gcm-playground\web\node_modules\gulp-minify-html\node_modules\through2,
npm WARN unmet dependency which is version 0.6.5
==> Install bower dependencies
./start.sh: line 45: bower: command not found
==> Running gulp for building
./start.sh: line 48: gulp: command not found
==> Starting Docker containers
Starting gcmplayground_server_1
Starting gcmplayground_web_1
Attaching to gcmplayground_server_1, gcmplayground_web_1
[33mweb_1 | [0mmodule.js:341
[33mweb_1 | [0m throw err;
[33mweb_1 | [0m ^
[33mweb_1 | [0m
[33mweb_1 | [0mError: Cannot find module 'orchestrator'
[33mweb_1 | [0m at Function.Module._resolveFilename (module.js:339:15)
[33mweb_1 | [0m at Function.Module._load (module.js:290:25)
[33mweb_1 | [0m at Module.require (module.js:367:17)
[33mweb_1 | [0m at require (internal/module.js:16:19)
[33mweb_1 | [0m at Object.<anonymous> (/src/gcm-playground/web/node_modules/gulp/index.js:4:20)
[33mweb_1 | [0m at Module._compile (module.js:413:34)
[33mweb_1 | [0m at Object.Module._extensions..js (module.js:422:10)
[33mweb_1 | [0m at Module.load (module.js:357:32)
[33mweb_1 | [0m at Function.Module._load (module.js:314:12)
[33mweb_1 | [0m at Module.require (module.js:367:17)
[33mgcmplayground_web_1 exited with code 1
[0m[36mserver_1 | [0m<stream:stream from="gcm.googleapis.com" id="E4B3B4A6A882DFBA" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
[36mserver_1 | [0m<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[36mserver_1 | [0m<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
[36mserver_1 | [0m<stream:stream from="gcm.googleapis.com" id="79E04671C097B032" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
[36mserver_1 | [0m<stream:features><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>
[36mserver_1 | [0m<iq id="70b7ced5e631b767" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>822820668927@gcm.googleapis.com/A3DF7156</jid></bind></iq>
[36mserver_1 | [0m
我认为这是因为docker无法识别start.sh脚本中包含的sudo命令。我已经试图找到一种方法以某种方式为docker安装sudo,但到目前为止没有运气。
我显然在这里做错了什么,但请有人向我解释,因为我缺乏经验..
注意:我使用的是Windows。