title: How to flatten a Docker image?
body: <p>I made a Docker container which is fairly large. When I commit the container to create an image, the image is about 7.8 GB big. But when I <code>export</code> the container (not <code>save</code> the image!) to a tarball and re-import it, the image is only 3 GB big. Of course the history is lost, but this OK for me, since the image is "done" in my opinion and ready for deployment. </p>
  
  <p><strong>How can I flatten an image/container without exporting it to the disk and importing it again? And: Is it a wise idea to do that or am I missing some important point?</strong></p>