title: What does `--rm` do when running a docker image with data volumes?
body: <p>While going through the docker documentation on running images with mounted volumes the following command has the <code>--rm</code> flag set on it. </p>
  
  <pre><code>$ docker run --rm -it -v ~/.bash_history:/.bash_history ubuntu /bin/bash
  </code></pre>
  
  <p>What does the <code>--rm</code> flag do?</p>