Many Docker commands show something that in the lack of a better word I’d call a "pseudo-GUI" on the console, like for example Docker build. This GUI is staying at the same position on the console and updating live:
I’d rather like to have a simple stream of output, like it is written by most console applications. Means no control characters, no colors, just writing line after line.
Is there a command option to do so on the Docker CLI?
2
Answers
That’s the default behavior of buildkit. To achieve the desired output, use
--progress=plain
when building the image:or you can disable
BUILDKIT
altogether for the build:The change in output format happened because BuildKit is now the default builder in Docker (as of version 23.0).
You can add
--progress=plain
to your docker command to have the output stream in a simpler format.If you want to set that as the default, you can set the
BUILDKIT_PROGRESS
environment variable toplain
in your shell startup file.You can opt out of using BuildKit by setting the environment variable
DOCKER_BUILDKIT
to0
. Then it’ll use the legacy builder and the output will look like you’re used to. I won’t recommend this though and the legacy builder will likely be removed in a future version of Docker.