简体   繁体   English

EC2 CLI泊坞窗中可用的AWS ECR映像

[英]AWS ECR image available in EC2 CLI docker

I pushed a Docker image into an AWS ECR. 我将Docker映像推送到AWS ECR中。 Is there a way to also make it available in the EC2 instance associated with this repository (ie usable with the various docker CLI commands)? 有没有办法使它在与此存储库关联的EC2实例中可用(即,可与各种docker CLI命令一起使用)?

As an example when I run docker images I don't view a new image I just pushed using docker push <Repository URI> in the list of images 例如,当我运行docker images我没有查看仅使用映像列表中的docker push <Repository URI>的新映像

Once you have pushed a Image to ECS , you will have to pull the image to run it as a container. 将映像推送到ECS之后,您将必须拉取映像以将其作为容器运行。 This can be done on any instance or your local machine. 可以在任何实例或本地计算机上完成此操作。 For doing this you can follow : 为此,您可以按照以下步骤操作:

1. aws ecr get-login --no-include-email --region <region> --profile <profile_name>
2. Cope the output from above and paste + enter
3. Pull the image finally as --> docker pull 501429058813.dkr.ecr.us-east-1.amazonaws.com/main:v1.0.0

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM