How to save log files from docker container?

后端 未结 1 493
伪装坚强ぢ
伪装坚强ぢ 2021-01-05 13:21

I have a weblogic container running on docker-machine( which is running on Windows 7 using docker toolbox) and want to save the logs from the container automatically to the

相关标签:
1条回答
  • 2021-01-05 14:03

    See "Docker Logging Strategies", which illustrates different methods.
    The recommended one is logging via the Docker Logging Driver.
    See more at "Configure logging drivers"

    As shown in "Better ways of handling logging in containers", you can then link the log folder with an host folder through a data volume container.

    # docker run -ti -v /dev/log:/dev/log fedora sh
    
    0 讨论(0)
提交回复
热议问题