title: Dockerrun.aws.json file for private dockerhub image
body: <p>I'm trying to deploy a rails application built with Docker to Elastic Beanstalk's multi-container service. My Dockerrun.aws.json currently looks like:</p>
  
  <pre><code>{
    "AWSEBDockerrunVersion": 2,
    "volumes": [
      {
        "name": "myapp",
        "host": {
          "sourcePath": "/var/app/current"
        }
      },
      {
        "name": "myapp-redis",
        "host": {
          "sourcePath": "/var/app/current/myapp-redis"
        }
      },
      {
        "name": "myapp-postgres",
        "host": {
          "sourcePath": "/var/app/current/myapp-postgres"
        }
      }
    ],
    "authentication": {
      "bucket": "myapp",
      "key": "config.json"
    },
    "containerDefinitions": [
      {
        "name": "redis",
        "image": "redis:3.0.5",
        "environment": [
          {
            "name": "Container",
            "value": "redis"
          }
        ],
        "portMappings": [
          {
            "hostPort": 6379,
            "containerPort": 6379
          }
        ],
        "essential": true,
        "memory": 128,
        "mountPoints": [
          {
            "sourceVolume": "myapp-redis",
            "containerPath": "/var/lib/redis/data",
            "readOnly": false
          }
        ]
      },
      {
        "name": "postgres",
        "image": "postgres:9.4.5",
        "environment": [
          {
            "name": "Container",
            "value": "postgres"
          }
        ],
        "portMappings": [
          {
            "hostPort": 5432,
            "containerPort": 5432
          }
        ],
        "essential": true,
        "memory": 128,
        "mountPoints": [
          {
            "sourceVolume": "myapp-postgres",
            "containerPath": "/var/lib/postgresql/data",
            "readOnly": false
          }
        ]
      },
      {
        "name": "myapp",
        "image": "myrepo/myapp:latest",
        "environment": [
          {
            "name": "Container",
            "value": "myapp"
          }
        ],
        "essential": true,
        "memory": 128,
        "mountPoints": [
          {
            "sourceVolume": "myapp",
            "containerPath": "/myapp",
            "readOnly": false
          }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>My <code>config.json</code> file is at bucket <code>myapp/config.json</code> and is formatted like:</p>
  
  <pre><code>{
    "https://index.docker.io/v1/": {
      "auth": "mylongauthtokenhere",
      "email": "me@myemail.com"
    }
  }
  </code></pre>
  
  <p>This setup works when I point to a public repo for the <code>"image": "myrepo/myapp:latest",</code> line, but when I try to initialize with this config I get errors: <code>err="Error: image myrepo/myapp:latest not found"</code> and <code>ERROR [Instance: i-913b2004] Command failed on instance. Return code: 1 Output: 'Failed to start ECS task after retrying 2 times.'</code></p>
  
  <p>I've also tried configuing config.json a few different ways with no luck. Any help on this would be greatly appreciated!</p>