![OpsWorks Chef 在 dokku 部署中出现错误](https://linux22.com/image/719292/OpsWorks%20Chef%20%E5%9C%A8%20dokku%20%E9%83%A8%E7%BD%B2%E4%B8%AD%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF.png)
在我调整其中一个 ec2 实例的大小之前,一切都运行正常,但现在我在 OpsWorks 中收到此错误:
Exception: Mixlib::ShellOut::ShellCommandFailed:
ruby_block[git push --force dokku@localhost:api.website.com deploy:master]
(dokku_deploy::default line 183) had an error:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of git push --force dokku@localhost:api.website.com deploy:master ----
STDOUT:
STDERR: warning: unable to access '/root/.config/git/attributes': Permission denied
remote: -----> Setting config vars [K
remote: GIT_REV: GITHASHKEY [K
remote: [1G-----> Cleaning up... [K
remote: Cannot connect to the Docker daemon. Is the docker daemon running on this host? [K
remote: Cannot connect to the Docker daemon. Is the docker daemon running on this host? [K
remote: [1G-----> Building api.website.com from herokuish... [K
remote: Cannot connect to the Docker daemon. Is the docker daemon running on this host? [K
remote: docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?. [K
remote: See 'docker run --help'. [K
remote: Cannot connect to the Docker daemon. Is the docker daemon running on this host? [K
remote: /var/lib/dokku/core-plugins/available/common/functions: line 441: test: : integer expression expected [K
To dokku@localhost:api.website.com
! [remote rejected] deploy -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@localhost:api.website.com'
堆栈跟踪片段:
/opt/aws/opsworks/releases/20180301151623_3448-20180301151623/vendor/bundle/ruby/2.0.0/gems/mixlib-shellout-1.4.0/lib/mixlib/shellout.rb:257:in `invalid!'
/opt/aws/opsworks/releases/20180301151623_3448-20180301151623/vendor/bundle/ruby/2.0.0/gems/mixlib-shellout-1.4.0/lib/mixlib/shellout.rb:244:in `error!'
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/shellout.rb:9:in `shellout'
/var/lib/aws/opsworks/cache.stage2/cookbooks/dokku_deploy/recipes/default.rb:185:in `block (3 levels) in from_file'
我不确定这是 OpsWorks、Chef 还是 Dokku 的问题。
答案1
我修复了这个问题,.json 文件中留下了一条注释