Docker CI builds with git submodules

Hi, its not clear to me how I can get a runner to checkout a complete application (where complete is the application with any submodules).

This is my first use of gitlab runners, and I will admit this is all very new to me - so sorry if the answer is obvious (please point me to it ;)

I wanted to run a build on a PHP projects, that has submodules (and I'm using docker if that makes a difference). Form what I see, gitlab check's out my branch, but doest checkout the submodules. When I have a git submodule update --init --recursive in my before_script of my gitlab-ci.yml file, the docker image I'm using (php:5.6) doesnt have git installed, so the build stops with "git command not found".

I know the runner has checked out my branch, how do I get it to do the submodules? (Or do I need to build my docker image with git (and ssh) in it?

(All the submodules are in the same gitlab instance.)