【问题标题】:Elastic Beanstalk Multicontainer Docker with private repository CannotPullContainerError具有私有存储库的 Elastic Beanstalk 多容器 Docker CannotPullContainerError
【发布时间】:2015-11-03 02:01:28
【问题描述】:

之前我使用的是单个 docker 容器弹性 beanstalk 环境。它能够使用我存储在 S3 上的登录凭据从私有 docker hub 存储库下载容器。 但是,我创建了一个新的多容器 docker 环境,从那时起我总是收到错误:

change="{TaskArn:arn:aws:ecs:eu-west-1:188125317072:task/dbf02781-8140-422a-9b81-93d83441747d
ContainerName:aws-first-test Status:4 
Reason:CannotPullContainerError: 
Error: image test/awstest:latest not found ExitCode:<nil> PortBindings:[] SentStatus:NONE}"

(我使用的容器与以前完全相同)

容器确实存在,并且环境与登录凭据位于同一位置(爱尔兰)

我的 Dockerrun.aws.json:

{
  "AWSEBDockerrunVersion": 2,
  "authentication": {
    "Bucket": "docker-ireland",
    "Key": ".dockercfg"
  },

  "containerDefinitions": [

    {
      "name": "aws-first-test",
      "image": "test/awstest",
      "memory": 250
    },
    {
      "name": "aws-second-test",
      "image": "test/awstest",
      "memory": 250
    }
  ]
}

【问题讨论】:

  • 您带有凭据的 json 有任何空格字符吗?
  • 他们有。它们是由 docker 自动创建的。我刚刚删除了所有制表符、空格和换行符。但是,我得到了相同的结果。

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


【解决方案1】:

Dockerrun.aws.json 区分大小写,在 2.0 版中,键 authentication、bucket 和 key 已更改为小写。

此答案来自亚马逊 AWS 论坛:https://forums.aws.amazon.com/message.jspa?messageID=667098

【讨论】:

    【解决方案2】:

    在我的情况下,这个错误是因为我的 S3 配置文件中有以下内容:

    {
      "server" :
      {
        "auth" : "*****",
        "email" : "*****"
      }
    }
    

    不是开玩笑,我有关键字“服务器”而不是注册表 url 服务(https://index.docker.io/v1/ 用于 docker)。

    我一定是从一些博客或文档 idk 中复制的。感觉已经倾倒了。

    【讨论】:

      猜你喜欢
      • 2020-04-21
      • 2015-10-02
      • 2019-10-09
      • 2017-07-26
      • 2014-03-22
      • 2018-06-20
      • 2017-10-14
      • 2021-06-27
      • 2017-12-26
      相关资源
      最近更新 更多