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
- Preserves the original Docker
psoutput, just adds color. - Replaces
dpsanddpsaaliases (from thedockerplugin) with colored versions. - 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 you plugin list
plugins=(... dockolor)
Reload your shell:
source ~/.zshrc
- Copy or clone the
dockolor.plugin.zshfile - Source it in your
.zshrcor.bashrc - Use the
dockolorcommand in place of thedocker pscommand - You can also add an alias, something like:
myalias() {
dockolor "$@"
}
Reload your shell:
source ~/.zshrc
dockolor— Same asdocker ps, but colorized.dps— Replaced withdockolor_dps, same asdockolorordocker ps.dpsa— Replaced withdockolor_dps -a, same asdockolor -aordocker ps -a.
