Why is docker build not showing any output from commands?

The output you are showing is from buildkit, which is a replacement for the classic build engine that docker ships with. You can adjust output from this with the --progress option:

  --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output
                            (default "auto")

Adding --progress=plain will show the output of the run commands that were no loaded from the cache.


If you don't want to use buildkit, you can revert to the older build engine by exporting DOCKER_BUILDKIT=0 in your shell, e.g.:

DOCKER_BUILDKIT=0 docker build ...

or

export DOCKER_BUILDKIT=0
docker build ...

Just use this flag --progress=plain after build.

For example:

docker-compose build --progress=plain <container_name>

OR

docker build --progress=plain .

If you don't want to use this flag every time, then permanently tell docker to use this flag by doing:

export BUILDKIT_PROGRESS=plain

Here is the official documentation when you type docker build --help.

--progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")