Gitlab-CI using Panther and Symfony 4

I tried to test my Symfony 4.1 app using gitlab-ci. Basically, when we Test PHP application we require php-cli docker image to execute composer install, phpunit.
But in this case I have a node packages to install, a React App in the front to test and a Rest API to test with my React Application.

I created a simple Symfony 4.1 App using React Routes in front and I execute a fetch to get a JSON from ApiController.

I made a TestCase using Panther to test it locally and it works perfectly.

It tooks 9 secondes because in the controller I wrote sleep 8 secondes before returning the Response. 

Then, I want to test my app using Gitlab-CI, when I push an update I want to be sure that everything is fine and I can safely deploy my app on production.

I write a gitlab-ci to test the app, and it fails… it fails… it fails… I check the log and I try… Finally I decided to write my own Docker image and test my app with it.

I made this Docker image base on Ubuntu 18.04. It contains PHP 7.2 andNode JS.
To be able to run Panther Unit Tests, we need to install 3 packages, (ZIP, Libnss3 and chromium-browser). All these stuffs are available in one place. The problem is that the size of the image is about 1.18GB !!

With this docker image I’m now able to run CI tests on gitlab.