简体   繁体   中英

Elastic Beanstalk Multicontainer Docker with private repository CannotPullContainerError

Previously I used a single docker container elastic beanstalk environment. It was able to use my login credentials that are stored on S3 to download a container from a private docker hub repository. However, I created a new multi container docker environment and since then I always get the error:

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}"

(I'm using exactly the same container that worked before)

The container does exist and the environment is in the same location as the login credentials (ireland)

My 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
    }
  ]
}

The Dockerrun.aws.json is case sensitive and in version 2.0 the keys authentication , bucket and key are changed to lower case.

This answer is from the amazon aws forums: https://forums.aws.amazon.com/message.jspa?messageID=667098

In my case this error was caused because I had something like the following in my S3 config file:

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

Not kidding, i had the keyword "server" instead of registry url service ( https://index.docker.io/v1/ for docker).

I must´ve copied from some blog or documentation idk. Feeling dump already.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM