AWS Elastic Container Registry

AWS Elastic Container Registry

Trong phần này chúng ta sẽ thực hiện lại quá trình xây dựng ứng dụng trên Contaienr và đẩy Docker image lên AWS Elastic Container Registry

Dựa vào tài nguyên đã chuẩn bị ở bài Triển khai ứng dụng trên Container

  1. Chúng ta đã tạo một Repository từ AWS Elastic Container Registry

    • Sau đó, chọn View push commands
    • Giao diện push commands, chúng ta chọn macOS/Linux
    • Các bước chi tiết để đẩy image lên AWS Elastic Container Registry

ECS Lab

  1. Đầu tiên, chúng ta sẽ sử dụng lệnh để login:
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 999999999999.dkr.ecr.ap-southeast-1.amazonaws.com
  • Kế đến là thực hiện build Docker image
docker build -t aws-fcj-management .
  • Sau đó, sẽ gán tag cho image vừa được build.
docker tag aws-fcj-management:latest 999999999999.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:latest

ECS Lab

  1. Sau cùng là đẩy image đã được đánh tag lên AWS Elastic Container Registry
docker push 999999999999.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:latest

ECS Lab

  1. Đẩy image lên AWS Elastic Container Registry thành công.

ECS Lab