Before you go, check out these stories!

Hackernoon logoPushing a Docker Image to the EC2 Container Registry by@mlabouardy

Pushing a Docker Image to the EC2 Container Registry

Author profile picture

@mlabouardyMohamed Labouardy

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:

|eval $(aws ecr get-loginโ€Šโ€”โ€Šregion us-east-1)

Issue the following command to tag the image with the repository URI:

|docker tag nginx

Run the following command to push it to the repository:

|docker push

Letโ€™s check the repository:


Join Hacker Noon

Create your free account to unlock your custom reading experience.