phpunit-docker
phpunit-docker copied to clipboard
Remove Composer from image
While using composer for installing phpunit is appreciated, it shouldn't be included in the final image.
Since the main point of phphunit/phpunit is a functional phpunit runable, composer should be removed.
This would result in a smaller image size.
Could this be achieved with ONBUILD somehow?
I'm missing some experience in maintaining docker images, but I'm willing to help, if someone can point me in the right direction.
I personally use this image on my CI server to:
- grab my source
- install dependencies via composer
- run unit tests
Composer must be used with: https://hub.docker.com/_/composer/
After some months of Docker I've learned something useful, which should help on this issue: multi-stage builds. https://docs.docker.com/develop/develop-images/multistage-build/