Skip to content

Instantly share code, notes, and snippets.

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 \
# 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=
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.