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:

 

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):

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 Dockerrun.aws.json for demo (note bucket name & file with key fields):

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 Dockerrun.aws.json file.

Pin It

Leave a Reply