Skip to content

Instantly share code, notes, and snippets.

@stollcri
Last active March 20, 2017 17:42
Show Gist options
  • Save stollcri/44897e488d9aa172ecab9733395d0e3d to your computer and use it in GitHub Desktop.
Save stollcri/44897e488d9aa172ecab9733395d0e3d to your computer and use it in GitHub Desktop.
# .docker/config.json
# 80 column loayouts
{
"psFormat": "{{ printf \"%s %32.32s:%-12.12s %-21.21s\" .ID .Names .Ports .Status }}",
"imagesFormat": "{{ $length := len .Repository }}{{ if gt $length 42 }}{{ $namelen := len (index (split .Repository \"/\") 1) }}{{ if gt $namelen 25 }}{{ $repo := printf \"...%.39s\" (index (split .Repository \"/\") 1) }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince $repo .Tag }}{{ else }}{{ $repo := printf \"%14.14s...%25.25s\" (index (split .Repository \"/\") 0) (index (split .Repository \"/\") 1) }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince $repo .Tag }}{{ end }}{{ else }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince .Repository .Tag }}{{ end }}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment