I am pretty new to Docker and just dockerized my PHP application.
On my local computer when I push all the new commits I run some tests with PHPUnit on the pre-push hook.
What is the best practice for implementing this hook with docker environment?
I thought about copule options,
Option 1:
Creating an 'App' container that is linked to the PHP container and only commit code through it.
The disadvantage of this option is that I have to only handle the commits with a container terminal, could be quite annoying and limiting.
Option 2:
Using in the hook script the docker exec
syntax on the PHP container.
What is the best practice for this situation?