AWS, Cloud, DevOps & Cloud Solutions

Docker Private Registry on AWS ECR

Set up simple Docker registry to use privately   or Share Images which team of Developers .

Definition : 

Docker Registry:

Docker registry is a service that is storing your docker images. Docker registry could be hosted by a third party, as public or private registry, like one of the following registries:

  • DockerHub,
  • Quay,
  • Google Container Registry,
  • AWC Container Registry .

Repository:

A collection of related images (usually providing different versions of the same application or service).

For this Article, we are going to cover how to Push docker images to Amazon ECR container and Pull Docker Images to local.

Amazon Elastic container Registry :

Amazon providing the Elastic Container Registry ( ECR) is a fully managed Docker Container registry that makes for Developers to store , Manage and Deploy Docker Container Images.

Amazon ECR eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure. Amazon ECR hosts your images in a highly available and scalable architecture, allowing you to reliably deploy containers for your applications.

1- Configure the Repository :

Login into the AWS Login Console  and Navigate to ECR Console

 

 

Navigate to Repositories:

 

Configure Repository:

Give the Name Of Repository

 

ECR Repository successfully created with the Name of  WebServer1 .

 

Now we need to Push /Pull Docker Images to AWS Docker Registry. we need to Log into the Docker AWS EMR from AWS CLI .

Login into the Machine and Instal the AWS CLI .

Navigate to the  Dockerfile Location .

cd /opr/Docker    and we can see the docker file content to build the Docker Image.

 

Please do Perform the below commands for pushing to docker image  to ECR Registry .

1)  aws ecr get-login –no-include-email –region us-west-2

2) Build your Docker image using the following command

3) After the build completes, tag your image so you can push the image to this repository:

docker tag webserver1:latest 329374685245.dkr.ecr.us-west-2.amazonaws.com/webserver1:latest

4 ) Run the following command to push this image to your newly created AWS repository:

5) we can see the image  in Registery .

 

Congratulation! You have successfully Push the image to AWS ECR .

 

About The Author

Leave a Reply

*