title: How to run 2 commands with docker exec
body: <p>I need to run 2 commands with docker exec.
  I am copying a file out of the docker container and don't want to have to deal with credentials to use something like ssh.
  This command copies a file:</p>
  
  <pre><code>sudo docker exec boring_hawking tar -cv /var/log/file.log | tar -x
  </code></pre>
  
  <p>But it creates a subdirectory var/log, I want to avoid that so if I could do these in the docker container I should be good:</p>
  
  <pre><code>cd /var/log ; tar -cv ./file.log
  </code></pre>
  
  <p>How can I make docker exec run 2 commands?</p>