Open mvhirsch opened 6 years ago
I personally use this image on my CI server to:
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/
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.