[英]Fetch a particular tagged latest image from AWS ECR repo
Is it possible to fetch latest image from ECR with a particular docker tag which starts from develop like developXXX
?是否可以使用特定的 docker 标签从 ECR 中获取最新图像,该标签从像developXXX
这样的 develop 开始? I am able to see latest image from a repo with this:我可以通过以下方式从回购中看到最新图像:
aws ecr describe-images --repository-name reponame --output text --region eu-west-1 --query 'sort_by(imageDetails,& imagePushedAt)[*].imageTags[*]' | tr '\t' '\n' | tail -1
Matching 'develop' keyword from all fetched image and returning the latest one with tail -1
.从所有获取的图像中匹配 'develop' 关键字并返回最新的带有tail -1
的图像。
aws ecr describe-images --repository-name reponame --output text --region eu-west-1 --query 'sort_by(imageDetails,& imagePushedAt)[*].imageTags[*]' | grep -w "develop" | tail -1
You can change logic in grep -w "develop"
part which can fit to your condition您可以在grep -w "develop"
部分更改适合您条件的逻辑
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.