Last active
August 29, 2015 14:01
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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