title: Docker Compose activate container on demand
body: <p>I have an application that performs elaboration over a data feed. The process is divided into tasks so I structured a <code>docker-compose.yml</code> file like this:</p>
  
  <pre><code>task1-service: 
    image: task1-image
  task2-service: 
    image: task2-image
  task3-service: 
    image: task3-image
  </code></pre>
  
  <p>Each task-service is triggered by the end of the previous and triggers the next, then it can exit. So there's no point to keep each service running.</p>
  
  <p>I wonder if there's a solution to keep them all stopped, and start each service on demand when needed. 
  I don't know if <code>docker compose</code> is the correct solution, but I like the idea ok keeping the system described into one <code>yml</code> file. Anyway, other solutions are appreciated.</p>
  
  <p>Thanks</p>