Write to a file on docker container gives error: No such file or directory
<p>I am trying to execute the following command:</p>

<pre><code>docker exec mydocker echo "hello" &gt;&gt; /usr/local/src/scores.txt
</code></pre>

<p>But it gives me the following error:</p>

<pre><code>No such file or directory
</code></pre>

<p>But using the following command:</p>

<pre><code>docker exec -it mydocker bash
</code></pre>

<p>I make sure that the file actually exists there. Is there something that I am missing here?</p>

<p>Thanks</p>