Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
a script to starting GitLab CI runners, which can run docker inside
docker run -d --name "gitlab-runner-$1" --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
docker exec -it "gitlab-runner-$1" gitlab-runner register -n \
--url "$3/ci" \
--registration-token "$2" \
--executor docker \
--description "ci-runner-$1" \
--docker-image "docker:latest" \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.