Force checkout the right version
Break into a separate provisioner step

Also add tweaks and optimizations from discourse dockerfile