Amazon Elastic Container Registry

Amazon Elastic Container Registry

Amazon Elastic Container Registry (ECR) is a fully managed Docker container hosting service that makes it easy for developers to store, manage, and deploy Docker container images. Amazon ECR is integrated with Amazon Elastic Container Service (ECS), which simplifies workflows from development to production. Amazon ECR eliminates the need to operate separate container repositories or scale the underlying infrastructure. Amazon ECR will become your image host in a highly available and scalable architecture, allowing you to consistently deploy containers for your application. Integration with AWS Identity and Access Management (IAM) gives you control over each repository at the resource level. With Amazon ECR, there are no upfront payments or commitments. You only pay for the amount of data you store in the repositories as well as the data transmitted over the Internet.

LAB-ECR-Docker

  1. Go to AWS Management Console
  • Find ECR
  • Select Elastic Container Registry

LAB-ECR-Docker

  1. In the Elastic Container Registry interface
  • Select Repositories
  • Select Create repository

LAB-ECR-Docker

  1. Enter Repository name, enter aws-fcj-management

LAB-ECR-Docker

  1. Select Create repository

LAB-ECR-Docker

  1. Select Repository just created

LAB-ECR-Docker

  1. Select View push commands

LAB-ECR-Docker

  1. Select macOS/Linux. Bước 7: Update IAM Role Admin ECR for EC2: “AmazonEC2ContainerRegistryFullAccess”
  • Prepare to execute commands according to instructions.

LAB-ECR-Docker

  1. Execute command login
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 999999999.dkr.ecr.ap-southeast-1.amazonaws.com

LAB-ECR-Docker

  1. Execute Docker image build
docker build -t aws-fcj-management .

LAB-ECR-Docker

  1. Then do tag assignment and push to ECR
docker tag aws-fcj-management:latest 9999999999999.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:latest
docker push 9999999999999.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:latest

LAB-ECR-Docker