Skip to content

Instantly share code, notes, and snippets.

@allanlei
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allanlei/300602157a54153b754b to your computer and use it in GitHub Desktop.
Save allanlei/300602157a54153b754b to your computer and use it in GitHub Desktop.
docker + etcd - Command to read all keys from a directory of etcd and set as env in a docker run command
docker run $(etcdctl ls $ETCD_ENV | while read e; do etcdctl get $e > /dev/null 2>&1 && echo --env $(echo $e | rev | cut -d/ -f1 | rev)=$(etcdctl get $e); done) busybox env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment