title: Docker "Gracefully stopping" itself during `docker-compose up` but not `docker-compose run --entrypoint`
body: <p>When I start a Docker container with <code>docker-compose up</code>, it starts up as usual, but eventually the container automatically exits without anything that I can tell is useful in the verbose log.</p>
  
  <p>When I instead run <code>docker-compose up --entrypoint run-tests.sh</code> with the same <code>docker-compose.yml</code> configuration (with the same entrypoint set) and the same Dockerfile, the Docker container says "Gracefully stopping" on its own and stops all containers.</p>
  
  <p>The bad behaviour seems to come from running <code>docker-compose up</code> instead of the equivalent <code>docker-compose run</code>.</p>
  
  <p>The container seems to stay up for varying times before it shuts down. In one instance it stayed up for 7 minutes, different times in others.</p>
  
  <p><strong>Does anyone know how to troubleshoot this?</strong></p>
  
  <p>Docker versions:</p>
  
  <pre><code>Docker version 1.9.0, build 76d6bc9
  docker-compose version: 1.5.0
  docker-machine version 0.5.0 (HEAD)
  </code></pre>
  
  <p>The <code>docker-compose --verbose up</code> log:</p>
  
  <pre><code>docker-compose --verbose --project-name monkeycore up monkeycore-autotest
  ... lots of startup log (let me know if you need to see this) ...
  # Scala Play1 Framework tests, not likely relevant
  monkeycore-autotest_1 | ~ MonkeyTest...                   PASSED     30s
  monkeycore-autotest_1 | ~ WhateverDataTest...             PASSED     33s
  monkeycore-autotest_1 | ~ SauceTest...                    PASSED     1 min 44s
  Gracefully stopping... (press Ctrl+C again to force)
  compose.cli.verbose_proxy.proxy_callable: docker containers &lt;- (all=False, filters={u'label': [u'com.docker.compose.project=monkeycore', u'com.docker.compose.oneoff=False']})
  compose.cli.verbose_proxy.proxy_callable: docker containers -&gt; (list with 2 items)
  compose.cli.verbose_proxy.proxy_callable: docker inspect_container &lt;- (u'617bf28c3f7ae3779f383f7e2a96f66e552e92f755a15d07ac6b73329ba3860f')
  compose.cli.verbose_proxy.proxy_callable: docker inspect_container -&gt; {u'AppArmorProfile': u'',
   u'Args': [u'-c', u'build.sh &amp;&amp; play auto-test'],
   u'Config': {u'AttachStderr': False,
               u'AttachStdin': False,
               u'AttachStdout': False,
               u'Cmd': None,
               u'CpuShares': 0,
               u'Cpuset': u'',
               u'Domainname': u'',
               u'Entrypoint': [u'bash', u'-c', u'build.sh &amp;&amp; play auto-test'],
  ...
  compose.cli.verbose_proxy.proxy_callable: docker inspect_container &lt;- (u'4963e9287ed10d587a79f57a52eaf86c07c6947b2119072bd5d68a3ed0eb161e')
  compose.cli.verbose_proxy.proxy_callable: docker inspect_container -&gt; {u'AppArmorProfile': u'',
   u'Args': [u'/usr/local/etc/redis/redis.conf'],
   u'Config': {u'AttachStderr': False,
               u'AttachStdin': False,
               u'AttachStdout': False,
               u'Cmd': None,
               u'CpuShares': 0,
               u'Cpuset': u'',
               u'Domainname': u'',
               u'Entrypoint': [u'redis-server',
  ...
  Stopping monkeycore_monkeycore-autotest_1 ...
  compose.cli.verbose_proxy.proxy_callable: docker stop &lt;- (u'617bf28c3f7ae3779f383f7e2a96f66e552e92f755a15d07ac6b73329ba3860f', timeout=10)
  Stopping monkeycore_monkeycore-autotest_1 ... done
  ERROR: compose.cli.main.main: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.
  </code></pre>
  
  <p><code>docker-compose.yml</code>:</p>
  
  <pre><code>monkeycore-base:
      build: ../
      dockerfile: "docker/monkeycore/Dockerfile"
      ports:
        - "8000:8000"
        - "8082:8082"
        - "9000:9000"
      stdin_open: true
      tty: true
      working_dir: "/path/to/dir"
      volumes:
        - src:dest
      environment:
        LOTS_OF_ENVIRONMENT_VARIABLES: "defined"
  
  monkeycore-autotest:
      extends:
        service: monkeycore-base
      links:
        - redis
      entrypoint: "run-tests.sh"
  
  redis:
      build: ./redis
      ports:
        - "6379:6379"
  </code></pre>