GitLab Runner on hosted Linux
Start Runner on hosted Linux
docker run -d –name gitlab-runner –restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:alpine
Runner registration
docker run –rm -it \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
gitlab/gitlab-runner:alpine register
Config changes
Step 1
Config editing
nano /srv/gitlab-runner/config/config.toml
or
vim /srv/gitlab-runner/config/config.toml
Step 2
Change
volumes = [“/cache”]
to
volumes = [“/var/run/docker.sock:/var/run/docker.sock”, “/cache”]