Created
October 28, 2019 16:00
-
-
Save jpralves/ddae2dd7f26c16ac6a74d06a28957a4c to your computer and use it in GitHub Desktop.
Obtain list of docker swarm secrets used by each stack
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
for s in $(docker service ls --format "{{.Name}}"); do echo $s; docker service inspect $s --format '{{range .Spec.TaskTemplate.ContainerSpec.Secrets}}{{println " " .SecretName}}{{end}}'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script should be run in a manager node.