Docker apache image, store logs in host?

守給你的承諾、 提交于 2019-12-06 09:43:54

Volumes but it stores the data both in container and host.

Not really, it should only store data in the host (and makes it visible in the container through a bind mount)

if there is a way to stream apache log data to stdout

Possible yes, through configuration, but that would not be persistent.

Check this post for the Apache configuration:

https://serverfault.com/questions/711168/writing-apache2-logs-to-stdout-stderr

Then you can inspect your logs with

docker log <container>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!