I’m using a gitlab runner using Docker in Linux (and I’ve used docker to deploy the runner itself, by mounting the docker socket into the runner, following the instructions) and I have a problem when 2 concurrent builds are using said runner. I’m getting (as an example):
Fetching changes with git depth set to 50... Reinitialized existing Git repository in /builds/myUsername/myProject/.git/ fatal: shallow file has changed since we read it
/builds is mounted into the docker container, so changes on one of the runners are being seen by the other runner and trashing it. I expected each docker image to have its own copy of the repository and not clobber each other like that. How can I configure my runners so I don’t have this kind of problem?
Thanks in advance.