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
ps
output, just adds color. - Replaces
dps
anddpsa
aliases (from thedocker
plugin) with colored versions. - Falls back gracefully if
awk
is not installed.
Clone the repository into the OhMyZsh plugin directory:
git clone [email protected]: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.zsh
file - Source it in your
.zshrc
or.bashrc
- Use the
dockolor
command in place of thedocker ps
command - 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 asdockolor
ordocker ps
.dpsa
— Replaced withdockolor_dps -a
, same asdockolor -a
ordocker ps -a
.