Last active
September 29, 2019 02:35
-
-
Save frozenex/dd6216caac54312efef39c6a017a8fc9 to your computer and use it in GitHub Desktop.
Gitlab Runner Docker Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -d \ | |
--name gitlab-runner \ | |
--restart always \ | |
-v /srv/gitlab-runner/config:/etc/gitlab-runner \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
gitlab/gitlab-runner:alpine | |
read -p "Enter gitlab runner registration-token: " TOKEN | |
docker exec -i gitlab-runner \ | |
gitlab-runner register -n \ | |
--non-interactive \ | |
--url https://gitlab.com/ \ | |
--registration-token $TOKEN \ | |
--executor docker \ | |
--description "Mobizerg Gitlab Runner" \ | |
--tag-list "build,test,deploy" \ | |
--run-untagged="false" \ | |
--docker-image "docker:stable" \ | |
--docker-privileged \ | |
--docker-volumes "/certs/client" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment