简体   繁体   中英

Elastic Beanstalk MultiContainer Docker Environment Variables

I have some docker images stored in ECR, and I'm trying to deploy them to ElasticBeanstalk. They're being deployed fine, but they're not picking up any of the environment variables from the host. If I deploy just the default multi-container docker setup, the containers do pick up the environment variables (set with eb setenv). Even trying to run locally they do not pick up the environment variables. Has anyone else experienced this and found a solution?

You can define the container environment variables in your Dockerrun.aws.json file.

For example, the following entry defines an environment variable with the name APP and the value PYTHON :

"environment": [
  {
"name": "APP",
"value": "PYTHON"
  }
 ], 

Ref- http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM