我在aws论坛中已经问过这个问题了: https://forums.aws.amazon.com/thread.jspa?threadID=254834&tstart=0
我有一个docker容器,它需要某些env变量。如何将RDS env变量注入docker容器?
RDS env变量是:
我的docker json文件是这样的:
{
"AWSEBDockerrunVersion": 2,
"volumes": [],
"containerDefinitions": [{
"name": "pact",
"image": "dius/pact_broker",
"essential": true,
"memory": 256,
"portMappings": [{
"hostPort": 80,
"containerPort": 80
}],
"environment": [{
"name": "PACT_BROKER_DATABASE_NAME",
"value": "pactbroker"
},
{
"name": "PACT_BROKER_DATABASE_PASSWORD",
"value": "TheUserPassword"
},
{
"name": "PACT_BROKER_DATABASE_HOST",
"value": "localhost"
},
{
"name": "PACT_BROKER_DATABASE_USERNAME",
"value": "pactbrokeruser"
}
],
"mountPoints": []
}
]
}