Terminate docker compose when test container finishes : <p>I am currently running a docker-compose stack for basic integration tests with a protractor test runner, a nodejs server serving a web page and a wildfly server serving a java backend.</p>

<p>The stack is run from a dind(docker in docker) container in my build server(concourse ci).</p>

<p>But it appears that the containers does not terminate on finishing the protractor tests.</p>

<p><em>So since the containers for wildfly, and nodejs are still running the build task never finishes...</em></p>

<p><strong>How can I make the compose end in success or failure when the tests are finished?</strong></p>

<pre><code># Test runner
test-runner:
  image: "${RUNNER_IMG}"
  privileged: true
  links:
    - client
    - server
  volumes:
  - /Users/me/frontend_test/client-devops:/protractor/project
  - /dev/shm:/dev/shm
  entrypoint:
    - /entrypoint.sh
    - --baseUrl=http://client:9000/dist/
    - /protractor/conf-dev.js
    - --suite=remember
# Client deployment
client:
  image: "${CLIENT_IMG}"
  links:
    - server
# Server deployment
server:
  image: "${SERVER_IMG}"
</code></pre>
