Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# cria o runner no docker
docker run -d \
--name gitlab-runner \
--restart always \
-v gitlab-runner:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
# Entra no runner criado anteriormente
docker exec -it gitlab-runner bash
# Cria as variaveis de ambiente com os valores do seu gitlab
# Você encontra esses valores no seu projeto em Settings > CI/CD > Runners
export GITLAB_URL=https://gitlab.example.com/
export GITLAB_TOKEN=J9y88dDZs_ADakscfPUf
# Registra o runner no seu gitlab
gitlab-runner \
register -n \
--name "Docker Runner" \
--executor docker \
--docker-image docker:latest \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock \
--url $GITLAB_URL \
--registration-token $GITLAB_TOKEN \
--tag-list test,linux,some-tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.