Skip to content

Instantly share code, notes, and snippets.

@peabnuts123
Created December 13, 2019 03:40
Show Gist options
  • Save peabnuts123/69dfcf9b80239073258e7f8e9cdb29e0 to your computer and use it in GitHub Desktop.
Save peabnuts123/69dfcf9b80239073258e7f8e9cdb29e0 to your computer and use it in GitHub Desktop.
docker ps alias for pretty-printing running containers, with only relevant fields
# Paste into your .bashrc / .bash_profile / .zshrc etc.
alias ls-containers="docker ps --format 'table {{.ID}}\t{{.Names}}\t{{.RunningFor}}\t{{.Status}}'"
@kimjayney
Copy link

kimjayney commented May 6, 2021

ec2-user@myip ~]$ docker ps -a --format 'table {{.Status}}' | grep -v 'STATUS'
Exited (0) 5 minutes ago
[ec2-user@myip ~]$ 

get container status command line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment