Last active
February 3, 2018 23:19
-
-
Save michaelconnor00/bc674ed2046ebaadd67dab3cfaf8523b to your computer and use it in GitHub Desktop.
Docker inspect formatting
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 service inspect \ | |
-f='{{range $ports := .Endpoint.Ports}}Service ID: {{$.ID}}, Image: {{$.Spec.TaskTemplate.ContainerSpec.Image}}Ports: {{json $ports}}{{end}}' \ | |
$(docker service ls -q) | |
# Less Verbose | |
docker service inspect -f='{{range $ports := .Endpoint.Ports}}{{json $ports}}{{end}}' $(docker service ls -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment