-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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] Update console color output to match the new color customization support in buildkit #9818
Comments
+1 Being able to disable the colours using an environment variable would be a really useful improvement. The colours are currently unreadable on my light terminal, and having to specify ‘—no-color’ on every invocation is cumbersome. |
Based on moby/buildkit#2954 (comment), this will likely need to wait until BuildKit v0.11 before support can be added to Compose. |
@milas This change has actually already been shipped in buildkit and pulled into buildx v0.9.0 (https://github.com/docker/buildx/releases/tag/v0.9.0) and is now available in the current Docker Desktop release 4.12.0 (https://docs.docker.com/desktop/release-notes/#docker-desktop-4120). When the Docker CLI v22.06.0 ships (there is a beta at the moment), Adding matching functionality for the |
Makes sense, but what about the rest of the output from The intention here was to suggest that all of the compose plugin output should be updated in a similar fashion so that setting something like In the long run, I could see a higher level env var, called |
@milas Should I create another issue that more specifically targets the normal |
AFAICT this is already supported with latest codebase: |
@ndeloof This issue is about making ALL the output from the compose plugin, to support colorization. This ONLY works currently when compose is using buildkit, it does not work for anything specific to This is why the description was suggesting that it might make sense to support a more generic This is an example of the plugin using the default dark blue, which is almost unreadable with a dark background. |
I agree it would be nice to have |
It would be even nicer if the default color scheme would default to light mode instead of cusing light gray on white or something similar when not in dark mode so I can read neither question nor answer. Ultimately annoying. Though dark mode may appeal to many, it also does not appeal to many. Please consider! (a light-mode user who uninstalls most utilities that only support dark mode as these are making my eyes utterly tired) |
@Tux this is not really a "dark mode" choice, just legacy terminals used white (or green) on black background, so the default coloring scheme. There's unfortunately no portable way to guess terminal colors to adjust to your local settings. |
What should I then set to be able to read the feedback and questions when I have light-background terminals? |
not configurable yet, see #9818 (comment) |
Description
buildkit output colors can now be configured (
BUILDKIT_COLORS
) or completely disabled (NO_COLOR
) via environment variables. This has been merged into the currently released versions ofbuildkit
anddocker buildx
, and will show up indocker build
as soon as Docker CLI v22.06.0. ships.See: moby/buildkit#2954
It would be really nice to implement the same support into this plugin (and other core docker plugins that output to the console).
The current dark blue is tough to read on a dark background.
For buildkit, the env var looks something like this:
BUILDKIT_COLORS=run=green:warning=yellow:error=red:cancel=cyan
It probably makes sense to support a
DOCKER_COLORS
env var which is read first by a plugin and then can be overridden by a more specific one if that is set (as in the BUILDKIT case).It is probably worth putting all this logic into a library that all these plugins can use, but that could be done as a later re-factor as well.
This is an example of what the output looks like from
docker buildx
, when this variable is used:Additional information you deem important (e.g. issue happens only occasionally):
Having constant and readable output is pretty important when pairing, mobbing, teaching etc, so making this configurable is pretty useful and avoids forcing people to change their terminal colors, just so the output can be read easily.
Output of
docker compose version
:Additional environment details:
compose
plugin from thev2
to make sure there wasn't any unreleased code that addressed this.The text was updated successfully, but these errors were encountered: