Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ECS/ECR: is common practice to have one repository per image (and associated versions)?

So I'm new to ecs/ecr, but it seems like I have to name (with a tag) the image after the repository name in order to push that image to the repository.

So my question is: Is it intended that the user (me) would ONLY be pushing a single image and any associated versions of that image to a single repository in ecr, thus creating ANOTHER repository if i need to push a completely different image?

basically, one repo for nginx, one repo for postgressql, etc.

like image 324
aphexlog Avatar asked Feb 01 '18 16:02

aphexlog


People also ask

Can a ECR repository have multiple images?

Note: In AWS ECR, you can have only have one repository per image but each repository can have multiple versions of a single image.

How many images are there in ECR?

Previously, the default limit was 1,000 repositories per region and 1,000 images per repository, and required an extra step to increase limits. Now, the default limit has been increased to 10,000 repositories per region and 10,000 images per repository to better align with your requirements and growth.

What is an ECR repository?

Amazon Elastic Container Registry (Amazon ECR) provides API operations to create, monitor, and delete image repositories and set permissions that control who can access them. You can perform the same actions in the Repositories section of the Amazon ECR console.


2 Answers

Yes. And also, possibly, no.

You push images to ECR. How you configure your image is up to you. Ideally, you'd have an image with a single responsibility, but this is your decision.

If you have multiple images, you push to multiple ECRs. If you have a single image doing many things, you can get away with a single ECR.

You can also push multiple images to the same ECR with creative use of tags (e.g. having the "image name or flavour" in the tag using your own naming convention.

like image 152
MrDuk Avatar answered Oct 03 '22 15:10

MrDuk


  1. It is recommended to push images with the version number of the same type.

For example your-repo:1.1, your-repo:1.2

If you push images with the same that exist in the ECR repository than your old image will be replaced with the new image you are pushing.

  1. It depends on how your application is working. It is always advised to separate container working logically separate.

For example The database image with a persistence volume. So, If a database container dies than it would not affect your data.

like image 45
mohit Avatar answered Oct 03 '22 15:10

mohit