I have an EB env with Docker web app (rails) properly deployed. I set several EB env variables and they are properly visible in the container. Now - I\'d like these EB env varia
I haven't tested this on all versions of Elasticbeanstalk. But on at least 64bit Amazon Linux 2015.03 v2.0.1 running Multi-container Docker 1.6.2 (Generic) there's a nicer way to get the envars from your config. There's a ruby script on the instance already that provides a proper json representation of the envars { "SOME_ENV_VAT" : "VALUE" }
# returns literal null from jq
sudo /opt/elasticbeanstalk/bin/get-config environment | jq -r '.MY_ENVVAR'
# returns empty string. Usefull for bash -z
sudo /opt/elasticbeanstalk/bin/get-config environment | jq -r '.MY_ENVVAR // empty'