Skip to content

Instantly share code, notes, and snippets.

@scicco
Last active March 7, 2023 16:32
Show Gist options
  • Save scicco/7d37ecfc85f6c80609bdf203cd755f19 to your computer and use it in GitHub Desktop.
Save scicco/7d37ecfc85f6c80609bdf203cd755f19 to your computer and use it in GitHub Desktop.
register_gitlab_runner.sh
#!/bin/bash
docker run --name gitlab-runner-register -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v gitlab-runner-config:/etc/gitlab-runner \
gitlab/gitlab-runner register \
--non-interactive \
--executor "docker" \
--docker-image alpine:latest \
--url "<GITLAB_URL_HERE>" \
--registration-token "<TOKEN_HERE>" \
--description "runner" \
--maintenance-note "runner"
docker logs -f gitlab-runner-register
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment