title: docker exec redirect stdout to host files
body: <p>I run a python script inside a docker and this script is printing some informations. </p>
  
  <p>I wish to write this logs to a file(on my host system). </p>
  
  <p>I try to do it like this: </p>
  
  <pre><code>( docker exec docker_1 /bin/bash -c 'cd folder &amp;&amp; python3 run.py') &gt;  ./logs/test.txt
  </code></pre>
  
  <p>But the file test.txt dosn't exist. I think that the file is being created inside my docker. But i want it outside from it!</p>