Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save keltuo/bf93c5d9f338ed108090ff5dc2a8534d to your computer and use it in GitHub Desktop.
Save keltuo/bf93c5d9f338ed108090ff5dc2a8534d to your computer and use it in GitHub Desktop.
Install gitlab-runner from docker and register token
docker run -d --name gitlab-runner-name --restart always \
-v /srv/gitlab-runner-name/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
docker run --rm -t -i \
-v /srv/gitlab-runner-name/config:/etc/gitlab-runner \
gitlab/gitlab-runner register -n \
--url "https://gitlab.com/" \
--registration-token "<<secret_token_from_gitlab>>" \
--executor docker \
--description "This is my awesome runner, maybe deamon." \
--docker-image "alpine:latest" \
--docker-privileged \
--docker-volumes "/certs/client"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment