- 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
Awesome, thank you ❤️ for your comment. Sadly it seems there is no alternative way to run GitLab jobs locally.