Build script improvements

Small improvements to the build script:
- Refactor the local build to improve clarity of build output
- Fix Docker build