Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Created March 16, 2022 18:52
Show Gist options
  • Save kaangiray26/5832f0e55ee94d279244027481c8423f to your computer and use it in GitHub Desktop.
Save kaangiray26/5832f0e55ee94d279244027481c8423f to your computer and use it in GitHub Desktop.
Installing and Registering Gitlab Runner on Docker

Use local system volume mounts to start the Runner container

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:latest

To register a runner using a Docker container:

docker run --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment