AWS Elastic Beanstalk Docker 环境变量
AWS Elastic Beanstalk Docker environment variables
如何在 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
如何在 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