Add `composer.json` in isolation
Similar to the node:onbuild
image, refactor to the following onbuild workflow:
- Add composer.json
- Run
composer install --no-script
- Add App Source Code
- Run
composer install
(with scripts)
The theory here is that the composer install
layer can be cached more easily by Docker, plus it improves the size of the image.