This is a GitLab CI runner with docker-compose
and git-lfs support.
It is strongly recommended to run this runner on a separate Docker host VM. For some more details why and why this is not using Docker-in-Docker, please read this blog posting.
We recommend running this runner only in non-public environments, see #4 for details.
- host-mounted Docker socket
docker >= 1.10.0
docker >= 1.9.0
docker >= 1.9.0
See also CHANGELOG for versions of docker
and docker-compose
on this image.
Connect to your runner host
docker-machine ssh ${RUNNER_HOST}
Get token from CI runners page (/admin/runners).
Set variables
export CI_RUNNER_TOKEN=<ENTER-YOUR-TOKEN-HERE>
Start runner (only one)
docker run -d \
--name runner \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/gitlab-runner/config:/etc/gitlab-runner \
-v /home/gitlab-runner/builds:/home/gitlab-runner/builds \
schmunk42/gitlab-runner:4.2.0-rc1
⚠️ It is very important to mount/home/gitlab-runner
to the same path inside the runner container.
First time setup
edit /home/gitlab-runner/config
Change concurrent
setting.
Obtain token from GitLab CI runners page, and export
it.
Debug commands
docker exec -it runner gitlab-runner verify
Start runner instances (TODO: check, if they run in parallel)
docker exec -it runner gitlab-runner \
register \
--executor shell \
-u https://my.gitlab.server:443/ci \
-r ${RUNNER_TOKEN} \
-n
docker build --pull -t local/runner .
Check version of runner
docker run local/runner -v
Built by dmstr