Skip to content

Instantly share code, notes, and snippets.

@shubhamoy
Forked from wzulfikar/docker-ps-vertical
Last active January 9, 2018 10:33
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 shubhamoy/74abaef50a3174ca2e1220ccefa3f5d2 to your computer and use it in GitHub Desktop.
Save shubhamoy/74abaef50a3174ca2e1220ccefa3f5d2 to your computer and use it in GitHub Desktop.
vertical format for docker ps
export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"
Usage: docker ps --format=$FORMAT
For persistence, we need to add this the shell configuration file. Like for OhMyZSH, we will do as follows:
echo 'export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"' >> ~/.zshrc
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment