push到ecr

您的安全凭证

访问密钥(访问密钥 ID 和秘密访问密钥)
aws configure
[ec2-user@ip-10-0-0-134 ~]$ aws ecr get-login-password --region ap-northeast-3 | docker login --username AWS --password-stdin 000111222.dkr.ecr.ap-northeast-3.amazonaws.com
WARNING! Your password will be stored unencrypted in /home/ec2-user/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[ec2-user@ip-10-0-0-134 ~]$ docker tag test:latest 0000.dkr.ecr.ap-northeast-3.amazonaws.com/test:latest
[ec2-user@ip-10-0-0-134 ~]$ docker images
REPOSITORY                                               TAG       IMAGE ID       CREATED          SIZE
test                                                     latest    00922e80b919   32 minutes ago   466MB
0000.dkr.ecr.ap-northeast-3.amazonaws.com/test   latest    00922e80b919   32 minutes ago   466MB
amazon/amazon-ecs-agent                                  latest    a28140893cff   5 days ago       61.7MB
amazonlinux                                              latest    ecdeb69c57ad   4 weeks ago      164MB
[ec2-user@ip-10-0-0-134 ~]$ docker push 0000.dkr.ecr.ap-northeast-3.amazonaws.com/test:latest
The push refers to repository [0000.dkr.ecr.ap-northeast-3.amazonaws.com/test]
b6ede59af2e7: Pushed
2ce46c79ab58: Pushed
latest: digest: sha256:3721c0935791c986d1e4da7909595f5a7a4be38342e8b4eb37157f6c134a7989 size: 742
[ec2-user@ip-10-0-0-134 ~]$

获得url

00**00.dkr.ecr.ap-northeast-3.amazonaws.com/test:latest

posted @ 2022-06-07 14:32  rootoor  阅读(136)  评论(0)    收藏  举报