title: docker-compose run and exec: No container found
body: <p>I was trying to open a second terminal un a docker with docker-compose.</p>
  
  <p>First run the container with </p>
  
  <pre><code>docker-compose run my-centos bash
  </code></pre>
  
  <p>And when I try to open a second terminal</p>
  
  <pre><code>docker-compose exec my-centos bash
  </code></pre>
  
  <p>I get the message</p>
  
  <pre><code>ERROR:No container found for my_centos_1
  </code></pre>
  
  <p>If I search the name of running container I get</p>
  
  <pre><code>CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS                    PORTS                    NAMES
  34a95b44f0a2        centos6   "bash"                   9 minutes ago       Up 9 minutes                                       docker_my-centos_run_1
  </code></pre>
  
  <p>why docker-compose exec search <code>docker_my_centos_1</code> and not <code>docker_my-centos_run_1</code>?</p>