【问题标题】:connecting Docker to a cloud provider, Amazon AWS将 Docker 连接到云提供商 Amazon AWS
【发布时间】:2017-05-02 06:17:31
【问题描述】:

上下文:我通过 Link to Amazon Web Services to create Swarms 连接到我的提供商。

成功创建角色。

然后,在创建策略以关联到角色时,发生了问题

问题: 发生错误:不能超过 PolicySize 的配额:5120

按照他们的建议,这是我需要在政策中添加的内容:

https://docs.docker.com/docker-for-aws/iam-permissions/

是否进行了一些研究,人们似乎喜欢这个解决方案:

https://github.com/docker/machine/issues/1655

如何使用最佳方法创建策略? 注意到 Docker 中的文档是错误的 - 在我的情况下不起作用 - 最好的方法是什么?

【问题讨论】:

  • @GhostCat 我投票为“需要编辑”的原因主要是由于标题和正文。我的问题很清楚,用户正在It's possible to get only the information the API makes available to us. In order to get that information, (1) Get the Access Token, (2) ... 行内寻找东西。

标签: amazon-web-services docker docker-swarm docker-cloud


【解决方案1】:

您正在查看将 docker-cloud 连接到 AWS 的错误说明,请按照以下说明操作:https://docs.docker.com/docker-cloud/infrastructure/link-aws/

就是以下三个步骤

  1. 为 docker-cloud 创建 AWS 策略
  2. 创建一个 docker-cloud 角色并附加来自 1 的策略
  3. 将 AWS 角色/帐户附加到 docker-cloud

上面 (1) 中的策略非常简单。应该允许它执行与 ec2 实例相关的操作(您的策略屏幕截图看起来不提供 ec2 权限):

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:*",
        "iam:ListInstanceProfiles"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

角色必须具有实施策略的权限。

有关通过 docker-cloud 部署的详细帖子,请参阅:https://blog.geografia.com.au/how-we-are-using-docker-cloud-for-automated-testing-and-deployments-of-applications-bb87ec3173e7

【讨论】:

    猜你喜欢
    • 2021-11-04
    • 1970-01-01
    • 2016-03-31
    • 1970-01-01
    • 1970-01-01
    • 2020-03-24
    • 1970-01-01
    • 2020-09-30
    • 1970-01-01
    相关资源
    最近更新 更多