Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Suggestion: Colorize the output of docker #301

Open
tbrodbeck opened this issue Jan 5, 2022 · 2 comments
Open

Feature Suggestion: Colorize the output of docker #301

tbrodbeck opened this issue Jan 5, 2022 · 2 comments
Labels
community_new New idea raised by a community contributor docker_desktop Improvements or additions to Docker Desktop

Comments

@tbrodbeck
Copy link

Expected behavior

It would be great if docker would support colorized output. This is a similar suggestion to this repo: kubernetes/kubectl#524.

Maybe it would be possible to include this binary? https://opensourcelibs.com/lib/docker-color-output

Thanks!

@tbrodbeck tbrodbeck added the community_new New idea raised by a community contributor label Jan 5, 2022
@christophermclellan christophermclellan added the docker_desktop Improvements or additions to Docker Desktop label Jan 14, 2022
@thaJeztah
Copy link
Member

Thanks for your suggestion! (Sorry for the late reply, I had this on my list of tickets to reply to)

Adding colors (and making some of the output of the CLI more "pretty" in general) is something that frequently comes up in internal discussions.

The short answer is that yes we do plan to work on this

The longer answer is that this requires quite some work and design. Even though there's no strict compatibility guarantees on CLI output, with literally millions of active users of the CLI we must be careful when introducing changes. Many users use the CLI in automated setups (CI, scripts, release pipelines), and such setups can easily break on changes in the output. In addition, we try to keep a close eye on consistency (for example, when changing output, we want to make sure that all CLI components, such as docker compose, docker buildx, docker scan, docker sbom, provide a similar experience (as they're all part of the same docker CLI), which requires careful planning (as multiple teams may need to be involved).

Adding color to output is not trivial; the control characters used to colorize the output can easily break scripts that consume the output (depending on how they're run), and there are many limitations that must be worked around, taking into account that the CLI is used on various platforms; macOS, Windows (both classic "CMD.EXE" and PowerShell), which means that picking "usable" colors is sometimes, erm, "tricky"; see moby/buildkit#2368 and moby/buildkit#2508 for some "fun" details.

We'll keep this on our roadmap though!

@spkane
Copy link

spkane commented Jul 6, 2022

@thaJeztah It would be really useful to start with "simply" making the default dark blue that is used by buildkit output, configurable via the docker client config and CLI. It is truly almost unreadable against some terminals, especially if you are doing any sort of screen share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community_new New idea raised by a community contributor docker_desktop Improvements or additions to Docker Desktop
Projects
None yet
Development

No branches or pull requests

7 participants