Created
June 2, 2022 23:49
-
-
Save leng-yue/a96d5dc9badb261fb97799f9226152c8 to your computer and use it in GitHub Desktop.
Setup GitLab Runner + dind
This file contains 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/sh | |
# Install the required packages | |
apt-get update && apt-get install -y curl | |
curl -fsSL https://get.docker.com | sh | |
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | bash | |
apt-get install -y gitlab-runner | |
# Configure the GitLab Runner | |
gitlab-runner register \ | |
--non-interactive \ | |
--url "https://gitlab.com/" \ | |
--registration-token "GR1348941tJ3zguK-5Xhvp9U7rSzr" \ | |
--executor "docker" \ | |
--docker-image "debian:latest" \ | |
--tag-list "hetzner,linux,4c8g" \ | |
--run-untagged="true" \ | |
--locked="false" \ | |
--docker-privileged="true" \ | |
--docker-volumes="/var/run/docker.sock:/var/run/docker.sock" \ | |
--docker-volumes="/certs/client" \ | |
--docker-volumes="/cache" | |
# Start the GitLab Runner | |
systemctl start gitlab-runner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment