Access to DockerHub images from Amazon Elastic Beanstalk

Access to DockerHub images from Amazon Elastic Beanstalk required when you need to deploy EBS environment based on Docker.

First on all you need to login to DockerHub (with account that has read & write permissions) using your’s machine terminal:

docker login


Screen Shot 2015-12-22 at 17.20.04

Than we need to copy content of ~/.docker/config.json to .dockerconfig (EBS require old-style file with cred):

cat ~/.docker/config.json > .dockerconfig

Screen Shot 2015-12-22 at 17.23.43


And finally, you need to remove auths block and file must be like this:

Screen Shot 2015-12-24 at 20.48.43

Ok, and now we need to create new S3 bucket in the same region as EBS will be deployed in.

..and upload dockerconfig to it:

Screen Shot 2015-12-22 at 17.29.31


Now we’ll create simple for demo (note bucket name & file with key fields):


"AWSEBDockerrunVersion": "1",

"Image": {
"Name": "kagarlickij/myapp1"

"Authentication": {
"Bucket": "dockerhubkey",
"Key": "dockerconfig"

"Ports": [
"ContainerPort": "80"


As you see, I’ve included to it my private image and DockerHub access key in S3 bucket.

So we can deploy new env to EBS now using file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.