-
Notifications
You must be signed in to change notification settings - Fork 509
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
build: --progress tty not applied in script #1288
Comments
Thanks for reporting; I think currently the "pretty" output is disabled if there's no TTY attached. This likely was done on purpose, due to how the That said; it looks like there's a "TODO" in the code to improve this (color would likely still be possible, but work may be needed to omit the progress bars and rewriting); |
Let me transfer this ticket to the buildx repository, as the BuildKit client code has been removed in master (the next release will use |
Looks like the equivalent of the code I linked above in buildx is here; buildx/util/progress/printer.go Lines 91 to 96 in ed00243
I don't see a TODO there, but perhaps it's tracked elsewhere; @jedevc @crazy-max ? |
What is the difference between Personally, when I explicitly ask for tty output, I want tty output. Including all the control codes to move around, draw progress bars, etc. If I wanted it to choose for me, I'd use |
This looks like a mistake to me, have opened a PR to correct: #1371. This function is pulled from buildkit, with some extra wrapping. However, they look like they've gotten out of sync.
See above - buildx should (with the PR merged) raise an error if tty is specified and tty is not available. As for forcing TTY when the output isn't a TTY - this isn't actually possible, at least without completely faking it. We could fake this interface by providing dummy values for all those resize functions... but I'm not convinced that's the right way forward. The buildkit TTY output is meant to be viewed from a TTY and doesn't make sense outside of that context. Viewing that output would then be completely wrong on a terminal that is a different size, etc. |
Description
Steps to reproduce the issue:
docker build --progress tty . 2>&1 | cat
.Describe the results you received:
Plain progress output.
Describe the results you expected:
Colored progress output.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Docker Desktop for Mac.
The text was updated successfully, but these errors were encountered: