ECR Repository
Opened this issue · 4 comments
caiocezart commented
Objectives:
- Create a private ECR repository for hosting wordpress container image
- The ECR Repository is not public
Acceptance Criteria:
- The ECR Repository is not public
- I can push a container to that Registry
- I can pull images from ECR from
EC2 instancesECS running on my VPC - The README contains the name of the repo and instructions to push/pull images from the repository
carloshz4 commented
Terraform code was added to create an ECR Repo. Also an iam policy and attachment to the role that the ECS task uses is added so that ECS can fetch the image from ECR.
Once we have the image "cooked" we could update the task to point to the ECR repo.
These are the temporary instructions to push an image:
aws ecr get-login --no-include-email --region ap-southeast-2
Copy and run the output of previous command. Once executed you should get a "Login Succeeded"
Get the repo URI:
aws ecr describe-repositories |grep repositoryUri
The use it to tag and push the built image, for example:
docker tag wordpress:latest 016454647794.dkr.ecr.ap-southeast-2.amazonaws.com/wordpress:latest
docker push 016454647794.dkr.ecr.ap-southeast-2.amazonaws.com/wordpress:latest
carloshz4 commented
carloshz4 commented
BTW, thanks for reviewing and approving it.