Skip to main content

Command Palette

Search for a command to run...

Day 28 : Creating a Private ECR Repository

100 Days of Cloud (AWS)

Updated
1 min read
Day 28 : Creating a Private ECR Repository

Welcome to Day 28. Today, we will learn how to create a private ECR repository. Docker files and other necessary files are already provided in the /root/pyapp directory. You just need to build the Docker image and push it to the AWS private ECR repository.

What is AWS Private ECR Repository?

Amazon ECR (Elastic Container Registry) Private is a fully managed Docker container registry that allows you to securely store, manage, and deploy your proprietary container images.

While a Public registry (like Docker Hub or ECR Public) allows anyone to download your images, a Private registry restricts access only to specific AWS accounts, IAM users, or VPCs that you authorize.

cd pyapp/

ls

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 119261019513.dkr.ecr.us-east-1.amazonaws.com

docker build -t datacenter-ecr .

docker tag datacenter-ecr:latest 119261019513.dkr.ecr.us-east-1.amazonaws.com/datacenter-ecr:latest

docker images

docker push 119261019513.dkr.ecr.us-east-1.amazonaws.com/datacenter-ecr:latest

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 29. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.

100 Days of Cloud (AWS)

Part 23 of 50

In this series you will learn how to configure and manage cloud resources using AWS. My intention is to provide an explanation and share the answers for 100 Days of Cloud (AWS) from KodeKloud.

Up next

Day 27 : Configuring a Public VPC with an EC2 Instance for Internet Access

100 Days of Cloud (AWS)