问题标签 [amazon-ecs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
726 浏览

amazon-web-services - Amazon ECS private DockerHub repo: Unable to decode provided docker credentials error

I have a private repository on DockerHub which I am trying to deploy with ECS. I always get the following error:

or if I try with type docker:

I have tried all possibilities mentioned on the ECS developer forums.

I tried:

I also tried:

And also (because of the docs at https://godoc.org/github.com/aws/amazon-ecs-agent/agent/engine/dockerauth):

I also tried without the '' and with "" around the JSON.. same effect. I always get the same error.

I should add I am getting ecs.config from an S3 container which works fine. I have also retyped the file manually in case there is some dubious formatting when the file is downloaded (though I don't see how this can be the case as the S3 file comes as a byte stream).

If I SSH into the instance and do the following:

I can then pull the image succesfully: docker pull A/B:latest

However, even after I log in (and therefore docker generates the ~/.docker/config.json file), I still get the same error from ECS.

I should mention all operations in changing the ecs.config file were done as follow:

  1. Change number of tasks to 0
  2. Wait to finish
  3. sudo stop ecs
  4. Change config file
  5. sudo start ecs
  6. Change number of tasks to 1

Repeat...

It is getting very frustrating.. How should this work or how has it changes since the documentation was written?

Any help would be appreciated.

EDIT

I also tried setting the docker auth in the JSON config file in /etc/ecs/ecs.config.json:

The JSON configuration for this is described here: https://godoc.org/github.com/aws/amazon-ecs-agent/agent/config. It is also mentioned in the code comments here: https://github.com/aws/amazon-ecs-agent/blob/b197eddd9d5272eeac7dddaa2a84cc4c85522354/agent/engine/dockerauth/doc.go

More specifically:

These keys may be set by either setting the environment variables "ECS_ENGINE_AUTH_TYPE" and "ECS_ENGINE_AUTH_DATA" or by setting the keys "EngineAuthData" and "EngineAuthType" in the JSON configuration file located at the configured "ECS_AGENT_CONFIG_FILE_PATH" (see http://godoc.org/github.com/aws/amazon-ecs-agent/agent/config)

This is again, giving the same error ...

0 投票
2 回答
377 浏览

amazon-web-services - AWS ECS 上的 Docker 纯数据容器

我有 4 个 docker 容器,其中 2 个继续运行 - nginx 和 hhvm。但此外,我还有 2 个不会永久运行的纯数据容器。除非您尝试将它们转发到 AWS ECS,否则这非常有效。

一般来说,纯数据容器只需要存在,但不必继续运行。所以我不确定现在要面对什么。保持容器运行只是一个修补程序,而不是解决方案。

由于仅数据容器不是最佳解决方案,因为在部署它时它被视为垃圾 - 我考虑使用其他一些可以引用的持久存储。但我不确定这一点。

0 投票
5 回答
18382 浏览

amazon-web-services - 通过 AWS ECS 在一个 EC2 实例中的多个 docker 容器

是否可以通过 AWS ECS(EC2 容器服务)在一个 EC2 实例中运行多个 docker 容器?

0 投票
1 回答
309 浏览

docker - 如何访问 OpsWorks ECS 层中的私有 Docker 存储库?

我正在尝试使用 ECS Ops-Works 层来管理一些自动化,但我无法弄清楚如何设置这些实例来设置 ecs.config 以包含我的私有 Docker 存储库凭据,如果管理 ec2 则需要手动执行直接就业。我想我需要以某种方式使用一些自定义 Chef 来覆盖设置配方来加载我的模板,而不是该文件的默认模板,但我是 Chef 的新手,所以不清楚如何做到这一点。

0 投票
3 回答
7567 浏览

amazon-web-services - Docker 推送到 AWS ECR 私有存储库失败,JSON 格式错误

我正在试用 AWS ECR 并将新标签推送到我们的私有存储库。

它是这样的:

登录有效,标签被创建,我看到它docker images,但推送神秘地失败。

这很可能是配置错误,但我不知道如何从中获得更多输出。该命令没有调试级别选项,没有其他日志,而且我无法拦截网络流量,因为它似乎已加密。

0 投票
2 回答
40075 浏览

amazon-web-services - 在 AWS ECS 中的任务定义之间链接容器?

我正在尝试在 AWS ECS 中设置一个具有关联数据库的基本 Web 应用程序。在本地,我在不同的容器中进行了这些设置,在 ECS 上,我希望有单独的任务定义,以便我可以分别扩展这两个。

  1. david_mongodb我在 ECS中成功注册了我的第一个任务定义。它有一个在其中命名的容器david_mongodb
  2. 然后我尝试将我的第二个任务定义注册为david_web,它有一个名为的容器,它david_web通过david_mongodb:db.
  3. 当我单击“创建”时,它返回一个错误:

    /li>

似乎任务定义在其他任务定义中看不到容器名称?我认为将容器david_webdavid_mongodb容器放在同一个任务定义中会起作用,但我不想这样做:它会阻止我单独扩展 Web 应用程序或数据库。本概述似乎证实了我的架构是推荐的......

那么如何链接存在于不同任务定义中的容器呢?还是有另一种巧妙的方法来处理这个问题?

0 投票
2 回答
2593 浏览

docker - Kubernetes 和 Amazon ECS 有什么区别

Amazon ECS 和 Kubernetes 实施架构有什么区别?

我需要决定为云中的容器管理选择一种技术。在选择这些技术时,决定因素是什么?

我正在使用 Docker 来创建和执行容器。

0 投票
1 回答
179 浏览

amazon-web-services - 容器实例是否需要具有出站 https 规则以及带有 IG 或 NAT 的路由表?

要让 EC2 实例注册到 AWS ECS 集群,它是否需要属于具有至少 HTTPS 上的出站规则的安全组并且能够连接到 vpc 外部?(也有 ecsinstancerole AIM 角色)

0 投票
6 回答
11545 浏览

amazon-web-services - 注册错误:NoCredentialProviders:链 ECS 代理错误中没有有效的提供者

我正在尝试使用 EC2 容器服务。我使用 terraform 来创建它。我已经定义了一个 ecs 集群、自动缩放组、启动配置。一切似乎都奏效了。除了一件事。ec2 实例正在创建,但它们没有在集群中注册,集群只是说没有可用的实例。

在创建实例的 ecs 代理日志中,我发现日志被一个错误淹没:

注册错误:NoCredentialProviders:链中没有有效的提供者

ec2 实例是使用适当的角色 ecs_role 创建的。此角色有两个策略,其中一个是以下策略,例如所需的文档:

我正在使用 ami ami-6ff4bd05。最新的地形。

0 投票
1 回答
444 浏览

amazon-web-services - 如何使用 wercker 在 ecs 中创建 docker 映像并更新任务定义

我正在获取 phusion/baseimage 并在 wercker.yml 文件的“构建”管道中更新它,但在“部署”管道中推送到我的注册表的图像似乎不是“phusion/baseimage”的更新版本,我我正在安装 Java、nginx 等,但容器图像不一样。请帮忙!我很困惑,因为我错过了一步。这是我的 wercker.yml:

我的场景很简单:我需要创建一个以“phusion/baseimage”为基础的 docker 映像并更新我的注册表,然后自动执行 ecs 任务定义更新并运行该任务。