Compute - ECR (Elastic Container Registry) Flashcards

1
Q

What is Elastic Container Registry (ECR)?

A
  • ECR is a fully managed service by AWS.
  • It provides a secure location to store and manage docker images.
  • It allows developers to push, pull, and manage their docker images in a central and secure location.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What components are used in ECR?

A
  • Registry: Hosts and stores docker images and creates image repositories.
  • Authorization token: Used to authenticate the docker client with the registry.
  • Repository: Groups together and secures docker images.
  • Repository policy: Controls access and permissions for specific users.
  • Image: Docker image stored in the repository.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you access your ECR registry?

A
  • The default URL for the registry is: https://aws_account_id.dkr.ecr.region.amazonaws.com
  • IAM policies and repository policies can control access to the registry and images.
  • Docker clients need to be authenticated with an authorization token to access the registry.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you authenticate a docker client with the ECR registry?

A
  • Run the “aws ecr get-login” command with the AWS CLI to obtain an authorization token.
  • Copy and paste the output docker login command into the docker terminal.
  • This associates the docker CLI with the default registry and provides authorization for 12 hours.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are repositories in ECR?

A
  • Repositories are objects within the registry that group and secure docker images.
  • Multiple repositories can be created within a registry to organize and manage images.
  • IAM policies and repository policies control access and permissions for each repository.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can access to ECR be controlled?

A
  • IAM managed policies: AmazonEC2ContainerRegistryFullAccess, AmazonEC2ContainerRegistryPowerUser, and AmazonEC2ContainerRegistryReadOnly.
  • Repository policies: Resource-based policies that determine access and permissions for users.
  • Access to the “ecr get authorization token” API call is required for AWS users to gain access.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you push and pull docker images from ECR?

A
  • Use the “docker push” command to push an image into ECR.
  • Use the “docker pull” command to retrieve an image from ECR.
  • Refer to the provided documentation links for more information on performing these actions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly