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 not loaded from the cache. This can also be done by setting the BUILDKIT_PROGRESS variable:

export BUILDKIT_PROGRESS=plain

If you are debugging a build, and the steps have already been cached, add --no-cache to your build to rerun the steps and redisplay the output:

docker build --progress=plain --no-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 ...

Leave a Comment