Skip to content

devemio/docker-color-output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage Downloads Release License

Docker Color Output is a lightweight CLI that adds readable, customizable colors to Docker command output. It reads from stdin, applies a YAML ruleset with per-column logic, and writes clean, aligned tables to stdout.

Features

  • Cross-platform: macOS, Linux, Windows.
  • YAML rules: per-column colors, matches, and thresholds.
  • Pipeline-friendly: works as a simple pipe in shell workflows.

Installation

Binaries are available on the releases page.

Mac

brew install dldash/core/docker-color-output

Linux

sudo add-apt-repository ppa:dldash/core
sudo apt update
sudo apt install docker-color-output

Windows

Download the Windows build from the releases page.

Quick Start

docker ps | docker-color-output
docker images [--format] 2>/dev/null | docker-color-output

Note

On Docker 29+, docker images writes extra output to stderr, so redirect it (2>/dev/null) when piping into docker-color-output.

Configuration

Pass a custom YAML config with -c:

docker-color-output -c ~/.config/docker-color-output/config.yaml

See internal/config/default.yaml for the full default configuration, including all commands and rules.

Example override:

layout:
  headerColor: yellow
rules:
  commands:
    dockerPs:
      rules:
        "STATUS":
          pipeline:
            - type: match
              when:
                - contains: "Exited"
                  color: red
              default:
                color: brown

Usage

If you want shortcuts, use the bash aliases in bash/aliases.sh.

Tested with Docker 29.1.3.

docker images / docker image ls

di # alias
docker images [--format] 2>/dev/null | docker-color-output

docker images

docker ps

dps # alias
docker ps [-a] [--format] | docker-color-output

docker ps

docker compose ps

dcps # alias
docker compose ps | docker-color-output

docker compose ps

docker stats

ds # alias
docker stats [--no-stream] | docker-color-output

docker stats

License

This project is licensed under the MIT License.

About

🎨 Docker color output which improves readability.

Topics

Resources

License

Stars

Watchers

Forks

Contributors