aws 容器镜像仓库产品叫ECR,官方文档参考:Amazon Elastic Container Registry。
1)账号认证
# 配置aws命令
$ aws configure set aws_access_key_id ${ak}
$ aws configure set aws_secret_access_key ${sk}
2)镜像仓库登陆
# 登陆镜像仓库
$ aws ecr get-login-password --region ${region_id} | docker login --username AWS --password-stdin ${仓库地址}
3)docker tag
# docker tag
$ docker tag docker.io/library/golang:1.19 ${account}.dkr.ecr.us-east-1.amazonaws.com/golang:1.19
4)docker push
# 镜像push
$ docker push ${account}.dkr.ecr.us-east-1.amazonaws.com/golang:1.19