dockolor is a lightweight plugin that enhances your docker ps experience with color-coded output based on container status. It also replaces common aliases like dps and dpsa if defined.
- Colors container statuses:
- 🟢 Up / Running — Green
- 🟡 Paused — Yellow
- 🔴 Exited / Dead — Red
- Colors are theme aware.
- Preserves the original Docker
psoutput, just adds color. - Replaces
dpsanddpsaaliases (from thedockerplugin) with colored versions. - Works well even with
--format json. - Falls back gracefully if
awkis not installed.
Clone the repository into the OhMyZsh plugin directory:
git clone git@github.com:bouteillerAlan/dockolor.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/dockolor
Then add dockolor in your plugin list
plugins=(... dockolor)
Reload your shell:
source ~/.zshrc
- Copy or clone the
dockolor.plugin.zshfile - Source it in your
.zshrcor.bashrc
Reload your shell:
source ~/.zshrc
Flag can be put in any order since we just check for docker container ps or docker ps.
So you can just use your command like you're always do:
docker psthe output is automatically colorizeddocker container pssame asdocker psdocker ps --format json --no-trunc -ayes that works too :)docker <any other command>are passed through unchangeddpsreplaced the one created by the docker plugin for oh-my-zsh, but it acts the same way (colorizeddocker ps)dpsasame asdps(colorizeddocker ps -a)- You can also call
dockolordirectly, this is basically thedockercommand
