← Back to list

100 Days of Cloud (AWS) Task:28 Setting up ECR (Elastic container Registry) in AWS.

Task is to create a ECR (Elastic container Registry) Repository in AWS to store the Docker image in it.

Mani · 2026-05-15 11:43 · 0 claps · 0.9 min read
#containerization #aws-ecr #docker-image #dockerfiles
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

100 Days of Cloud (AWS) Task:28 Setting up ECR (Elastic container Registry) in AWS.

Task is to create a ECR (Elastic container Registry) Repository in AWS to store the Docker image in it.

Docker file is a text file which contains instructions on how to build a docker image.

Docker Images are the software package which contains everything like code, libraries, settings and tools which is required for the software to run.

Docker Container is a light weighted virtual box where developers can package their applications and dependencies in it to eliminate the tedious environment configurations.

Now we gonna create ECR Repository using AWS CLI.

Command : aws ecr create-repository — repository-name (repo name) :(repo name) is the name of the repository.

Below command takes you to the docker file location

Command : cd /root/pyapp

Next step is to build docker image

Command: docker build -t (repo name):latest .

Get Account ID : aws sts get-caller-identity.

ECR Login command :aws ecr get-login-password — region us-east-1 | docker login — username AWS — password-stdin 825526788326.dkr.ecr.us-east-1.amazonaws.com

Tag Image Command : docker tag (repo name)):latest ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/(repo name):latest

Push Image : docker push ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/(repo name):latest

Docker workflow

Code -> Docker build -> Docker Tag -> Push it to ECR -> Server pull the image -> Application starts running.


메타데이터
post_id
2f4e24410f76
slug
100-days-of-cloud-aws-task-28-setting-up-ecr-elastic-container-registry-in-aws-2f4e24410f76
url
https://medium.com/@mbmani66/100-days-of-cloud-aws-task-28-setting-up-ecr-elastic-container-registry-in-aws-2f4e24410f76
canonical_url
https://medium.com/@mbmani66/100-days-of-cloud-aws-task-28-setting-up-ecr-elastic-container-registry-in-aws-2f4e24410f76
author_url
https://medium.com/@mbmani66
status
ok
fetched_at
2026-06-09 15:37:30