Reducing Docker Intermediate Layers and Dockerfile Complexity
psidox.com
psidox.com
docker run layered-image -n container /bin/echo #noop
docker export container > tarball.tar
cat tarball.tar | docker import - flat-image
This has the disadvantage that your new flat image doesn't have any CMD directive. You can add it with another dockerfile, starting with FROM flat-image, and skipping straight to CMD ["/bin/bash", "/bootstrap.sh"]