title: how to wait for "docker exec " to complete before continue in shell script
body: <p>I have a docker exec command, and I want to wait for it to complete before continuing the rest of a shell script, how do I accomplish that?</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  docker exec -it debian sleep 10;
  
  wait
  echo done
  </code></pre>
  
  <p>Update: should not use -it option </p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  docker exec debian sleep 10;
  
  wait
  echo done
  </code></pre>