title: Docker exec - Write text to file in container
body: <p>I want to write a line of text to a textfile INSIDE a running docker container. Here's what I've tried so far:</p>
  
  <pre><code>docker exec -d app_$i eval echo "server.url=$server_url" &gt;&gt; /home/app/.app/app.config
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>/home/user/.app/app.config: No such file or directory
  </code></pre>
  
  <p>Second try:</p>
  
  <pre><code>cfg_add="echo 'server.url=$server_url' &gt;&gt; /home/user/.app/app.config"
  docker exec -i app_$i eval $cfg_add
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>exec: "eval": executable file not found in $PATH
  </code></pre>
  
  <p>Any ideas?</p>