devemio / docker-color-output

🎨 Docker color output which improves readability.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coverage Downloads Release License

πŸ‘¨β€πŸ’» Installation

This package enhances the Docker output experience by employing a pipeline mechanism. With this feature, you have the ability to customize and apply various color schemes to the output generated by Docker commands. This improves the readability and visual appeal of the output.

You can find all compiled binaries 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

You can download the Windows build from the releases page.

😺 Configuration

You can customize the color palette to your liking, to do this you need to run docker-color-output with the -c flag and specify the path to the configuration file. You can overwrite only the colors you want, the rest will be used by default.

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

Default configuration file:

{
  "colors": {
    "reset": "\u001b[0m",
    "black": "\u001b[0;30m",
    "darkGray": "\u001b[1;30m",
    "red": "\u001b[0;31m",
    "lightRed": "\u001b[1;31m",
    "green": "\u001b[0;32m",
    "lightGreen": "\u001b[1;32m",
    "brown": "\u001b[0;33m",
    "yellow": "\u001b[1;33m",
    "blue": "\u001b[0;34m",
    "lightBlue": "\u001b[1;34m",
    "purple": "\u001b[0;35m",
    "lightPurple": "\u001b[1;35m",
    "cyan": "\u001b[0;36m",
    "lightCyan": "\u001b[1;36m",
    "lightGray": "\u001b[0;37m",
    "white": "\u001b[1;37m"
  }
}

πŸ“š Usage

πŸͺ„ Aliases

Use these bash functions to improve the user experience.

πŸ’‘ docker images

di # alias
docker images [--format] | docker-color-output

docker images

πŸ’‘ docker ps

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

docker ps

πŸ’‘ docker compose ps

⚠️ The latest version works with docker-compose 2.x.

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

docker compose ps

πŸ’‘ docker stats

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

docker stats

About

🎨 Docker color output which improves readability.


Languages

Language:Go 95.7%Language:Makefile 2.6%Language:Shell 1.7%