JulienBreux / phpunit-docker

DEPRECATED :package: Docker image to use PHPUnit as CLI.
https://hub.docker.com/r/phpunit/phpunit/
MIT License
47 stars 28 forks source link

Remove Composer from image #81

Open mvhirsch opened 6 years ago

mvhirsch commented 6 years ago

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.

westy92 commented 6 years ago

I personally use this image on my CI server to:

JulienBreux commented 6 years ago

Composer must be used with: https://hub.docker.com/_/composer/

mvhirsch commented 6 years ago

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/