Skip to content

Instantly share code, notes, and snippets.

@ildarmf
Created January 23, 2020 15:54
Show Gist options
  • Save ildarmf/3bb40d259977bc98f4d7f10ef6fb662e to your computer and use it in GitHub Desktop.
Save ildarmf/3bb40d259977bc98f4d7f10ef6fb662e to your computer and use it in GitHub Desktop.
for i in {1..5}; do \
docker run --rm -d --name shared-runner${i} -v /opt/gitlab/:/opt/gitlab-runner/ -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner register \
--config "/opt/gitlab-runner/config.toml" \
--non-interactive \
--executor "docker" \
--docker-image docker:19.03.1 \
--url "https://bla.bla/" \
--registration-token "*********************" \
--description "shared-runner${i}" \
--run-untagged="true" \
--locked="false" \
--docker-volumes="/var/run/docker.sock:/var/run/docker.sock" \
--access-level="not_protected";
done
for i in {1..5}; do \
docker run -d --name shared-runner${i} -v /opt/gitlab/:/opt/gitlab-runner/ -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner run -c /opt/gitlab-runner/config.toml; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment