How to run gitlab-runner with docker
How to run gitlab-runner with Docker
How to run gitlab-runner with Docker
create a docker volume
docker volume create gitlab-runner-configrun the gitlab-runner container
docker run -d --name gitlab-runner --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v gitlab-runner-config:/etc/gitlab-runner \
gitlab/gitlab-runner:latestregister a project with gitlab-ruuner container ( it is in interactive mode)
docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner registercheck the configuration file of gitlab-runner
[root@docker ~]# cat /var/lib/docker/volumes/gitlab-runner-config/_data/config.toml
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "gitlab-tmp-project"
url = "https://gitlab.com/"
token = "GssVseaD_s_dyv342WS4"
executor = "shell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
login to it
go into home directory
running the whole process in one script
screenshot of the result

Last updated