- cd into your project directory
- You probably need to use
exec docker --docker-privileged
when you want to use docker-in-docker (servicedocker:dind
) - If you have issues with the Docker daemon not being reachable, you have 2 options:
- disable TLS:
exec docker --env DOCKER_TLS_CERTDIR=""
- mount the certs:
exec docker --docker-volumes "/certs/client"
- disable TLS:
docker run --rm --name gitlab-runner -w $PWD \
-v $PWD:$PWD -v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest exec docker <job>
docker run --rm -d \
--name gitlab-runner \
-v $PWD:$PWD \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
- If you use template jobs (.test) then specify those as job.
docker exec -it -w $PWD gitlab-runner gitlab-runner exec docker <job>
docker stop gitlab-runner
- SSH into Rancher VM:
LIMA_HOME="$HOME/Library/Application Support/rancher-desktop/lima" "/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl" shell 0
I found one and it works perfectly : https://github.com/firecow/gitlab-ci-local
you just need to run : gitlab-ci-local in the gitlab repository and it does the whole job !