AWS Docker Golang。 'eb deploy'错误

时间:2015-08-28 03:56:23

标签: amazon-web-services go docker elastic-beanstalk

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

  1. 我使用预定义的FROM golang:1.4.2-onbuild
  2. eb本地跑步 - 工作得很漂亮,没问题。
  3. 如果我压缩并上传zip文件,它在AWS上运行没问题。
  4. ...但是当我尝试'eb deploy'时,我不断收到此错误。
  5. 请提出任何建议。

    谢谢。

    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. 
    

1 个答案:

答案 0 :(得分:0)

将项目文件夹移动到

/go/src/{your_project}

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