How to Create & Configure Elastic Container Registry on AWS

Amazon Elastic Container Registry (ECR) is a fully managed container registry that makes it easy to store, manage, share, and deploy  container images and artifacts anywhere.

Amazon ECR transfers  container images over HTTPS and automatically encrypts images at rest. Amazon ECR Public makes it easy to publicly share container software worldwide for anyone to download.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 1

 

  • Under Containers select Elastic Container Registry.

 

Fig 2

 

  • Click on Create Repository.

 

Fig. 3

 

  • We can Create Repository either Public or Private.
  • Provide Repository name.

 

Fig. 4

 

  • We can enable image scan setting. Each Images automatically scanned after being pushed to a repository.
  • Click on Create Repository.

 

Fig. 5

 

  • New Repository created successfully.
  • Click on New Created Repository name.

 

Fig. 7

 

  • Click on View Push Commands.

Fig. 7

 

  • Run the following commands shown is given below image for push an image from linux to ECR.

 

Fig. 8

 

Create Elastic Registry using Shell

To create a repository

aws ecr create-repository –repository-name repo-name

To create a repository configured with image tag immutability

aws ecr create-repository –repository-name repo-name –image-tag-mutability IMMUTABLE

To create a repository configured with a scanning configuration

aws ecr create-repository –repository-name repo-name –image-scanning-configuration scanOnPush=true

 

Leave a Reply

Your email address will not be published.