Skip to content

Instantly share code, notes, and snippets.

Avatar

David Steiman xetys

View GitHub Profile
@xetys
xetys / create-ci-runner.sh
Created Sep 25, 2016
a script to starting GitLab CI runners, which can run docker inside
View create-ci-runner.sh
#!/bin/sh
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 \
gitlab/gitlab-runner:latest
docker exec -it "gitlab-runner-$1" gitlab-runner register -n \
--url "$3/ci" \
--registration-token "$2" \