Or you can use tee to show the logs and also save it to a file
docker build --no-cache --progress=plain . 2>&1 | tee build.log
If you want to append new logs and not to overwrite on every build, use >> for the redirection as you did originally. If you choose the version with tee, you can use tee -a to append the new logs
When I came back to see your response I noticed I left the --no-cache option in all of my commands. That option is not required of course. You can remove it.