title: How can I run containers detached and have them automatically removed when they exit?
body: <p>Why are <code>-d</code> and <code>--rm</code> conflicting arguments in Docker?</p>
  
  <pre><code>$ docker run -d --rm image
  Conflicting options: --rm and -d
  </code></pre>
  
  <p>I have a number of containers that run unit/functional/integration tests. The Docker containers start, run the tests, and then stop. I run them detached since I only care about the results, but I'd also like the containers to be removed after the container exits. What would be a good way to do this?</p>