技術筆記 / Docker

AWS Lambda Use Docker (ECR)

ECR

  1. get-login-password
aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com

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

aws_account_id go to Iamv2 Page

  1. Create a repository
aws ecr create-repository     --repository-name hello-world     --image-scanning-configuration scanOnPush=true     --region ap-southeast-1
  1. To tag and push an image to Amazon ECR
docker tag hello-world:latest 420798909600.dkr.ecr.ap-southeast-1.amazonaws.com/hello-world:latest

docker push 420798909600.dkr.ecr.ap-southeast-1.amazonaws.com/hello-world:latest

參考文獻

tags: aws

在 GitHub 看原文