Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services AWS Elastic Beanstalk Docker环境变量_Amazon Web Services_Docker_Amazon Elastic Beanstalk - Fatal编程技术网

Amazon web services AWS Elastic Beanstalk Docker环境变量

Amazon web services AWS Elastic Beanstalk Docker环境变量,amazon-web-services,docker,amazon-elastic-beanstalk,Amazon Web Services,Docker,Amazon Elastic Beanstalk,如何将环境变量传递给在AWS Elastic Beanstalk中运行的Docker容器多个Docker容器配置(不同容器不同)?在容器描述中使用环境键 { "containerDefinitions": [ { "name": "myContainer", "image": "something", "environment": [ { "name": "MY_DB_PASSWORD", "

如何将环境变量传递给在AWS Elastic Beanstalk中运行的Docker容器多个Docker容器配置(不同容器不同)?

在容器描述中使用
环境

{
  "containerDefinitions": [
    {
      "name": "myContainer",
      "image": "something",
      "environment": [
        {
          "name": "MY_DB_PASSWORD",
          "value": "password"
        }
      ],
      "portMappings": [
        {
          "containerPort": 80,
          "hostPort": 80
        }
      ],
      "memory": 500,
      "cpu": 10
    }]
}

有关更多信息,请参阅:

谢谢,了解如何在任务定义中定义
udp
端口映射。