- Priya
- November 29, 2021
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.
- Under Containers select Elastic Container Registry.
- Click on Create Repository.
- We can Create Repository either Public or Private.
- Provide Repository name.
- We can enable image scan setting. Each Images automatically scanned after being pushed to a repository.
- Click on Create Repository.
- New Repository created successfully.
- Click on New Created Repository name.
- Click on View Push Commands.
- Run the following commands shown is given below image for push an image from linux to ECR.
Create Elastic Registry using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
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