Save docker-compose logs to a file
<p>I have unit tests running on my build server and would like to capture the log results for analysis when something fails. I have yet to find a way to redirect the output of <code>docker-compose logs</code> to a file, or to find where the log files themselves actually live.</p>

<p>I want the equivalent of:</p>

<pre><code>docker-compose logs &gt; logs.txt
</code></pre>

<hr>

<p>Edit - clarification:</p>

<p>All of my docker containers produce useful logs, which a manual run of <code>docker-compose logs</code> reveals. I want to script this process to save those same logs to a file that is an artifact on my build server. Essentially, the output of <code>docker-compose logs</code> saved to a file, however <code>docker-compose logs</code> never exits.</p>