title: Command works inside a docker container but fails with docker exec
body: <p>I'm using containerized Vespa.ai DB, and I want to execute the following commands from the host:</p>
  <ol>
  <li>vespa-stop-services</li>
  <li>vespa-remove-index</li>
  <li>vespa-start-services</li>
  </ol>
  <p>If I execute the following <code>vespa-stop-services &amp;&amp; vespa-remove-index &amp;&amp; vespa-start-services</code> from my shell after I attach the container, it works fine. But when I use docker exec it fails.</p>
  <p>I tried the following commands:</p>
  <pre><code>docker exec bash -c 'vespa-stop-services &amp;&amp; vespa-remove-index &amp;&amp; vespa-start-services'
  
  docker exec bash -l 'vespa-stop-services &amp;&amp; vespa-remove-index &amp;&amp; vespa-start-services'
  </code></pre>
  <p>The only way I successfully managed to execute those commands, is when I execute them sequentially, which I would like to avoid:</p>
  <pre><code>docker exec bash -l 'vespa-stop-services'
  
  docker exec bash -l 'vespa-remove-index'
  
  docker exec bash -l 'vespa-start-services'
  </code></pre>
  <p>What am I doing wrong?
  Thanks in advance!</p>