0

Normally it is possible to create log file of running container but i want create a log file of a build container is it possible.If yes, then how to create log file?

vicky
  • 81
  • 2
  • 4

1 Answers1

1

The command you're looking for is

( sudo docker build -t abc ) | tee build.log

as seen here. This will show the progress of the build on your console and also log it into build.log.

Note: You cannot log what happens in an image. The image is like a blueprint. You can monitor how the blueprint is made, but then it stops. When you build something from that blueprint (e.g. a container), you monitor the new item.

Community
  • 1
  • 1
michaelbahr
  • 4,837
  • 2
  • 39
  • 75
  • I am not getting it,can you please give the command to create a log file of following image.If i am building an application image using the command: sudo docker build -t abc . where abc is by application image. – vicky Dec 11 '15 at 10:47