如何使用 Amazon linux 2 在 Elastic beanstalk 中使用多容器 docker? [英] How to use multi container docker in Elastic beanstalk using Amazon linux 2?

查看:31
本文介绍了如何使用 Amazon linux 2 在 Elastic beanstalk 中使用多容器 docker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,亚马逊已弃用运行在 64 位 Amazon Linux 上的多容器 Docker.需要迁移到 运行在 64 位 Amazon Linux 2 上的 Docker.在第一个版本中,我们使用 Dockerrun.aws.json v2 来管理多容器 docker.在最新版本中(Docker running on 64bit Amazon Linux 2),我们需要使用 Dockerrun.aws.json v3docker-compose.但是没有可用的示例或博客.我可以获得工作样品吗?.

Currently, Amazon deprecated Multi-container Docker running on 64bit Amazon Linux.Need migrate to Docker running on 64bit Amazon Linux 2. In 1st version , we used Dockerrun.aws.json v2 to manage multi container docker. In latest version (Docker running on 64bit Amazon Linux 2), we need to use Dockerrun.aws.json v3 or docker-compose. But there is no working example or blogs are available. Can i get working samples ?.

推荐答案

关于 Elastic Beanstalk 和在 64 位 Amazon Linux 2 平台上运行的 Docker.

In regards to Elastic Beanstalk and the Docker running on 64bit Amazon Linux 2 platform.

我也很挣扎,终于找到了它的底部.让我感到困惑的是,该文档使您似乎可以选择使用 EB 应用程序包中的 Dockerrun.aws.json (v3) 或 docker-compose.yml.

I was struggling too and finally got to the bottom of it. What confused me is that the documentation makes it seem like you can choose to use either, the Dockerrun.aws.json (v3) or a docker-compose.yml in your EB application package.

然后你去寻找关于 Dockerrun.aws.json (v3) 的文档,你在任何地方都找不到.

Then you go looking for the documentation on Dockerrun.aws.json (v3), and you won't find it anywhere.

这样做的原因是,您别无选择.如果要运行多个容器,则必须在应用程序包中包含 docker-compose.yml.Dockerrun.aws.json (v3) 允许您做的唯一一件事是配置 s3 存储桶和容器存储库身份验证文件.dockercfg"位置的密钥

The reason for this is that, you don't get a choice. If you want to run multiple containers you must include a docker-compose.yml in your application package. The only thing the Dockerrun.aws.json (v3) allows you to do is configure the s3 bucket and key to the location of your container repository authentication file ".dockercfg"

这本质上是Dockerrun.aws.json (v3)"的文档;它不支持任何类似于Dockerrun.aws.json (v2)

This is essentially the documentation for "Dockerrun.aws.json (v3)" it doesn't support anything similar to the "Dockerrun.aws.json (v2)

{
  "AWSEBDockerrunVersion": "3",
  "Authentication": {
    "bucket": "DOC-EXAMPLE-BUCKET",
    "key": "mydockercfg"
  }
}

包含一个 docker-compose.yml,只有当 docker 镜像位于私有存储库中时,您才需要 dockerrun.aws.json (v3).

Include a docker-compose.yml and you'll need the dockerrun.aws.json (v3) only if the docker images are in a private repository.

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker-configuration.html

这篇关于如何使用 Amazon linux 2 在 Elastic beanstalk 中使用多容器 docker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆