2

This fine question addresses how to perform a docker build with the stdout from RUN commands visible.

On the other hand, I have not been able to find a way to review the stdout from RUN commands from a standard docker build that has just run. Particularly if it's successful, since all that's left in the terminal is a list of the Dockerfile commands that were run. I find it really uncomfortable when I'm used to just "scrolling up" to review how things went.

Do I really need to delete the cache and re-run the 45 minute / 80GB process (in my case) with --progress=plain to not lose the output?

Heath Raftery
  • 3,643
  • 17
  • 34

1 Answers1

-1

With

docker ps

you can list running containers. From there you can get your container id of the container you want to see the logs.

After that you can simply say docker logs <THE ID> to see the logs. If you want to watch new incoming logs too, then say docker logs -f <THE ID>.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Kerem
  • 489
  • 5
  • 21