gpt4 book ai didi

amazon-web-services - 如何匿名从 AWS ECR docker 镜像中提取?

转载 作者:行者123 更新时间:2023-12-02 20:48:31 25 4
gpt4 key购买 nike

我知道我们需要登录 ECR 才能从 AWS ECR 中提取 docker 镜像。我怎样才能让它匿名?由于我们将代码、数据和基础设施(都是开源的)分开,我们发现基础设施部分不需要私有(private)。

我能够找到使用 * 创建权限的方法,但不确定如何使其匿名,以便任何想要下载的人都不需要 IAM 用户访问权限。

下面是政策,

{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublic",
"Effect": "Allow",
"Principal": "*",
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability"
]
}
]
}

不知道如何创建匿名 IAM 用户。

最佳答案

如果您阅读 FAQ

Q: Can Amazon ECR host public container images?

Amazon ECR currently supports private images. However, using IAM resource-based permissions, you can configure policies for each repository to allow access to IAM users, roles, or other AWS accounts.


我能想到的唯一解决方法可能是将 EC2 机器和使用 NGINX 放到 proxy_pass到 ECR url 并将 EC2 IP 用于 docker repo

关于amazon-web-services - 如何匿名从 AWS ECR docker 镜像中提取?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46858799/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com