EDIT: from the [github issue](https://github.com/dotcloud/docker/issues/332#issuecomment-2...):
"Currently the only way to "squash" the image is to create a container from it, export that container into a raw tarball, and re-import that as an image. Unfortunately that will cause all image metadata to be lost, including its history but also ports, env, default command, maintainer info etc. So it's really not great."