I am using the BUILDKIT version of "docker build" frequently. This gives colorful and "dynamic" output, i.e., it will for example show 5 lines, all of which contain changing progress information.

For example:

[+] Building 140.6s (4/12)                                                      
 => => sha256:ab5ef0e5819490abe86106fd9f4381123e37a03 63.54MB / 75.78MB  139.6s
 => => sha256:9a62185b95350e0cf3dba655a9461824080fd70a 10.18MB / 10.18MB  20.4s
 => => sha256:211f13f4e617a585a4c3a9cf73734c780febbec14dd 4.83kB / 4.83kB  0.3s
 => => sha256:0ca27d7286e3ce558e7898856e42b8db25c9190 193.65kB / 193.65kB  1.2s
 => => sha256:6916189c40907fdd6e44b7798cbd19e959b4087 62.98MB / 90.77MB  139.6s
 => => sha256:3343f16055aacd0f750e89e04b7f9e4bf014ba8 53.21MB / 55.76MB  139.6s
 => [internal] load build context                                          0.1s
 => => transferring context: 196.71kB                                      0.1s

The way docker build works is that it downloads all those things at the same time. So all the numbers are increased in parallel. In a real terminal, it looks very nice; nothing flickers, no lines are scrolling, only the numbers are increasing beautifully.

In principle, this kind of works in compilation-mode. That is, all the information is there; the colors are there, and I can see what's going on. But every "tick", it scrolls another copy of the 5 lines through, instead of just updating the few bytes in the previous 5 lines which changed.

I know that I can change the output of docker build; this question is not about this specific program. But does anyone know if I can somehow coerce Emacs to show this as beautifully as the shell?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.