Docker-brew 0.5.2 support and memory footprint reduction

Fixes some egregious issues and speeds up the build process.