diff --git a/docker/symfony/Dockerfile b/docker/symfony/Dockerfile
index 3a8946a399460bb61c49d93c466ca96ca79b16cb..82c096c37aac5563caffe0b7e0e18b093d474939 100755
--- a/docker/symfony/Dockerfile
+++ b/docker/symfony/Dockerfile
@@ -34,7 +34,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
     libzip-dev \
     zlib1g-dev \
     libxml2-dev \
-    libicu-dev
+    libicu-dev \
+    netcat
 
 RUN docker-php-ext-configure gd --with-freetype --with-jpeg
 
diff --git a/tools/ci-job.sh b/tools/ci-job.sh
index ab878a7135d7cc7256b0a85d229d7b3883112d67..d82fb53ec2a44acbf78ad4e43857374fb51fe0fc 100755
--- a/tools/ci-job.sh
+++ b/tools/ci-job.sh
@@ -26,6 +26,10 @@ run_step "Starting apache" apache2ctl -DFOREGROUND &
 run_step "PHP dependencies" composer install
 run_step "Javascript dependencies" npm install
 run_step "Assets compilation" npm run dev
+echo "Waiting for mysql to be up and running"
+until nc -z -v -w30 mysql 3306; do
+    sleep 5
+done
 run_step "Doctrine create DB" php bin/console doctrine:migrations:migrate --env=test
 run_step "Doctrine load fixtures" php bin/console doctrine:fixtures:load --no-interaction --env=test
 run_step "Unit and functional tests" composer tests