Enable community applications for unraid tobegin with (This is what i used to get access to more apps from DockerHub). Click here to find out how to do this.
You will need to enabled
Enable additional search results from dockerHub? from here: http://tower.local/Apps/ca_settings
Now simply go to apps, search for
gitlab-runner, click ‘get more results from docker hub’ and then install the app.
Once loaded head over the docker tab, edit your new docker container and add a mapping for the config for the gitlab-runner. For me I did
/mnt/user/appdata/gitlab-runner-1 --> /etc/gitlab-runner
Now go into the container and register the runner to your gitlab instance. You can find your registration token and URL for the runner from
/admin/runners within your gitlab instance. You can set your tags now or edit them in the UI after the runner is setup.
gitlab-runner register --non-interactive --url "https://XXXX.XXXX/" --registration-token "XXXXXXXXX" --executor "docker" --docker-image kroniak/ssh-client --description "docker-runner" --tag-list "docker,aws" --run-untagged="true" --locked="false"
In the above example I use ‘kroniak/ssh-client’ as my base instance but you can pick anything such as
debian:jessie. I find that kroniak/ssh-client has everything I need and is as slim as possible.
This is the very basics of how to get it set up, you can see examples of gitlab-ci.yml using this seutp over in the repository for this blog site.
I’ve also tweaked around with my config.toml that will appear in
/mnt/user/appdata/gitlab-runner-1, if you disable the cache directory it won’t leave old docker containers behind in UNRaid.
concurrent = 1