Skip to content

Instantly share code, notes, and snippets.

@secfigo
Created May 27, 2018 15:07
Show Gist options
  • Save secfigo/ff5910b2965fbbea5bc96564a944e62c to your computer and use it in GitHub Desktop.
Save secfigo/ff5910b2965fbbea5bc96564a944e62c to your computer and use it in GitHub Desktop.
Gitlab runner registration with extra-hosts for both docker and shell executor
sudo gitlab-runner register \
--non-interactive \
--url "https://gitlab.local/" \
--registration-token "xJWfniGqvSeVyKc3vaQx" \
--executor "docker" \
--docker-image ubuntu:16.04 \
--description "docker-runner" \
--tag-list "docker,aws" \
--run-untagged \
--docker-extra-hosts "gitlab.local:10.0.1.15" \
--docker-privileged \
--locked "false"
sudo gitlab-runner register \
--non-interactive \
--url "https://gitlab.local/" \
--registration-token "xJWfniGqvSeVyKc3vaQx" \
--executor "shell" \
--description "gitlab-runner" \
--run-untagged \
--locked "false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment