Correct boot2docker detection
Set socket.timeout in docker image
Optimize docker image creation

This makes the last step the one that changes, enabling docker to re-use
more images.