How to see all output when executing `docker build`

The docker build is scrolling the output.

docker build -t "setuppython"  .

In the screenshot the area enclosed in the red rectangle is being scrolled – and the prior output is lost. I would like to be able to see all output without it being hidden:

enter image description here

Here is the Dockerfile

from ubuntu:20.04
RUN echo "HOME is $HOME"
COPY  ./ .

RUN ./

How can that be done?

>Solution :

Set the --progress=plain option, so modify the build command as follows:

docker build -t "setuppython" --progress=plain .

The --progress argument accepts the values auto, plain, and tty. Using tty, the output will try to be "nicer" for interactive terminals (so it overwrites itself), and plain will simply output everything. The auto setting (default) will try to determine which of the two is more appropriate for the current environment.

Leave a Reply