AWS Docker Golang。 'eb deploy'错误

我正在尝试将golang docker部署到AWS。

  1. 我使用预定义的FROM golang:1.4.2-onbuild
  2. 本地运行 – 精美的作品,没问题。
  3. 如果我压缩并上传压缩文件,它在AWS上工作没有问题。
  4. …但是当我尝试'eb部署'我不断收到这个错误。

任何build议,请。

谢谢。

bash-3.2$ eb deploy WARNING: Deploying a previously deployed commit. INFO: Environment update is starting. INFO: Deploying new version to instance(s). WARN: Failed to build Docker image aws_beanstalk/staging-app, retrying... ERROR: Failed to build Docker image aws_beanstalk/staging-app: urce files in /go/src/app [0mtime="2015-08-28T03:48:44Z" level="info" msg="The command [/bin/sh -c go-wrapper install] returned a non-zero code: 1" . Check snapshot logs for details. ERROR: [Instance: i-bf189879] Command failed on instance. Return code: 1 Output: (TRUNCATED)...n-zero code: 1" Failed to build Docker image aws_beanstalk/staging-app: urce files in /go/src/app [0mtime="2015-08-28T03:48:44Z" level="info" msg="**The command [/bin/sh -c go-wrapper install] returned a non-zero code: 1**" . Check snapshot logs for details. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI. INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1]. ERROR: Unsuccessful command execution on instance id(s) 'i-bf189879'. Aborting the operation. ERROR: Failed to deploy application. 

移动你的项目文件夹

 /go/src/{your_project} 

问题是我的项目文件夹在$ GOPATH文件夹之外。 一旦我解决了这个问题,'eb deploy'开始工作。