Pushing a Docker Image to the EC2 Container Registry

In this quick post, I will show you how to setup a Docker Registry on AWS using EC2 Container Registry (ECR) service and how to push & pull an image from Amazon ECR.

1 – Configure Repository

First login to your AWS Management Console then navigate to ECR:

Click on “Get Started“:

Choose a name for your repository, then click on “Next“:

At this point, you will be taken to the Repositories Dashboard:

Congratulation ! you have created your first AWS Docker Registry.

In order to push & pull docker images from/to ECR, we need to get docker login from AWS CLI:

Run the following command to push it to the repository:

Let’s check the repository: