How to create Elastic Container Repository(ECR) in AWS

To create Elastic Container Repository(ECR) In AWS

Introduction:

Amazon Elastic Container Registry reduces the need to operate and scale the infrastructure needed to power the container registry. It Just pushes the container images to Amazon ECR and pulls the images using any container management tool when need to deploy.

Steps to create ECR:

Login to the AWS account: Choose ECR in console management page: Create a repository: Then choose EC2 in console management page:

Create a new Instance: Create a IAM role for ECR: Continue to create Instances: Copy the public ip address and connect the AWS console through SSH by using key pair:

Open view push commands and open the document for reference: Copy the commands from document and execute in terminal step by step:

Create a docker image:

Copy the commands from push commands for ecr:

With this method Creation of ECR in AWS comes to an end.

FAQ
Q
Can I use Amazon ECR within local and on-premises environments?
A
Yes. You can access Amazon ECR anywhere that Docker runs such as desktops and on-premises environments.
Q
What is the difference between Amazon ECR public and private repositories?
A
A private repository does not offer content search capabilities and requires Amazon IAM-based authentication using AWS account credentials before allowing images to be pulled. A public repository has descriptive content and allows anyone anywhere to pull images without needing an AWS account or using IAM credentials. Public repository images are also available in the ECR public gallery.
Q
Is Amazon ECR a global service?
A
Amazon ECR is a regional service and is designed to give you flexibility in how images are deployed. You have the ability to push/pull images to the same region where your Docker cluster runs for the best performance. You can also access Amazon ECR anywhere that Docker runs such as desktops and on-premises environments. Pulling images between regions or out to the internet will have additional latency and data transfer costs.
Q
What is the pricing for Amazon ECR?
A
With Amazon ECR, there are no upfront fees or commitments. You pay only for the amount of data you store in your public or private repositories, and data transferred to the Internet.
Q
What is ECR in Amazon?
A
Amazon Elastic Container Registry eliminates the need to operate and scale the infrastructure required to power your container registry. Just push your container images to Amazon ECR and pull the images using any container management tool when you need to deploy.