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=0docker build ...
Just use this flag --progress=plain
after build
.
For example:
docker-compose build --progress=plain <container_name>
OR
docker build --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")
As an alternative to specifying the --progress=plain
option, you can also permanently disable the "pretty" output by setting this env variable in your shell config:
export BUILDKIT_PROGRESS=plain