Skip to content

Instantly share code, notes, and snippets.

@skyzyx
Forked from steve-jansen/docker-inspect.sh
Created December 15, 2020 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skyzyx/2eb84c87809c105304e5a4652ee4c706 to your computer and use it in GitHub Desktop.
Save skyzyx/2eb84c87809c105304e5a4652ee4c706 to your computer and use it in GitHub Desktop.
List labels for a docker container
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