Piping a file into docker run : <p>I need to pipe (inject) a file or some data into docker as part of the run command and have it written to a file within the container as part of the startup. Is there best practise way to do this ? </p>

<p>I've tried this.</p>

<pre><code>cat data.txt |  docker run -a stdin -a stdout -i -t ubuntu /bin/bash -c 'cat &gt;/data.txt'
</code></pre>

<p>But can't seem to get it to work. </p>
