title: How to run multiple bash commands (with piping), within Docker Compose
body: <p>I have a lengthy bash command in a Docker Compose:</p>
  <pre><code>  command: bash -c 'wait-for-it emul:4000 &amp;&amp; (firebase-prime ... | grep -v -E &quot;Do not use with production credentials&quot;) &amp;&amp; npx vite --port 3000'
  </code></pre>
  <p>If <code>firebase-prime</code> was not found, or it would fail, the whole command would still pass and Docker Compose keep running. How to make it fail, and Docker Compose to bring all the dependency services down, as well?</p>