Created
August 19, 2016 01:55
-
-
Save steve-jansen/a90f942e05e326e817aaeb04dff3f4e6 to your computer and use it in GitHub Desktop.
List labels for a docker container
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 inspect -f '{{ range $k, $v := .ContainerConfig.Labels -}} | |
{{ $k }}={{ $v }} | |
{{ end -}}' $cid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or if you don't mind json output:
docker inspect -f "{{json .Config.Labels}}" $cid