Created
November 4, 2015 16:10
-
-
Save bpholt/07752883f30cc4595d8d to your computer and use it in GitHub Desktop.
Consul Registrator service name environment variables of all running Docker containers
This file contains hidden or 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 inspect $(docker ps -q) | \ | |
jq 'map(.Config.Env | | |
map(select((. | startswith("SERVICE")) and | |
(. | startswith("SERVICE_IGNORE") | not)))) | | |
reduce .[] as $item ([]; . + $item)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment