如何将环境变量传递给在AWS Elastic Beanstalk中运行的Docker容器的多个Docker容器配置(不同的容器不同)?
使用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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句