AWS Elastic Beanstalk Docker环境variables

如何将环境variables传递给在AWS Elastic Beanstalk中运行的Docker容器多个docker容器configuration (不同的容器)?

在容器描述中使用environment密钥。

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

有关更多信息,请参阅: http : //docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html