title: How stop containers run with `docker-compose run`
body: <p>I'm trying to use <code>docker-compose</code> to orchestrate several containers. To troubleshoot, I frequently end up running bash from within a container by doing:</p>
  
  <pre><code>$ docker-compose run --rm run web bash
  </code></pre>
  
  <p>I always try pass the <code>--rm</code> switch so that these containers are removed when I exit the bash session. Sometimes though, they remain, and I see them at the output of <code>docker-compose ps</code>.</p>
  
  <pre><code>           Name                          Command                State      Ports
  ----------------------------------------------------------------------------------
  project_nginx_1            /usr/sbin/nginx                  Exit 0
  project_nginx_run_1        bash                             Up         80/tcp
  project_web_1              python manage.py runserver ...   Exit 128
  project_web_run_1          bash                             Up         8000/tcp
  </code></pre>
  
  <p>At this point, I am trying to stop and remove these components manually, but I can not manage to do this. I tried:</p>
  
  <pre><code>$ docker-compose stop project_nginx_run_1
  No such service: project_nginx_run_1
  </code></pre>
  
  <p>I also tried the other commands <code>rm</code>, <code>kill</code>, etc..</p>
  
  <p>What should I do to get rid of these containers?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Fixed the output of <code>docker-compose ps</code>.</p>