Overview
Amazon ECR (Elastic Container Registry) stores and manages Docker images on AWS. Instead of only an online repository like Docker Hub, you can store your own images on ECR.
Exam Pattern
Anytime you see storing Docker images, think ECR.
Repository Options
| Option | Details |
|---|---|
| Private repository | Images for your account(s) only |
| Public repository | Publish to the Amazon ECR Public Gallery |
Key Points
- Fully integrated with Amazon ECS.
- Images are stored behind the scenes by Amazon S3.
- All access is protected by IAM. On a permission error, check your policies.
- Features: image vulnerability scanning, versioning, image tags, image lifecycle.
ECS and ECR Together
- The ECR repository holds Docker images.
- An IAM role is assigned to the EC2 instance of the ECS cluster, allowing it to pull images.
- The instance pulls the image, then the container starts on the instance.
See 02-Amazon-ECS.
ECR to ECS
Questions & Answers
Q1: What is ECR?
Answer:
Elastic Container Registry, used to store and manage Docker images on AWS.
Q2: Where does ECR store images?
Answer:
Behind the scenes in Amazon S3.
Q3: How does an ECS EC2 instance pull from ECR?
Answer:
Through an IAM role assigned to the instance.
Q4: What features does ECR add?
Answer:
Vulnerability scanning, versioning, image tags and image lifecycle.
Check yourself
Quiz
Flashcards
Click the card (or focus it), then use ← → to move and Space to flip.