{"id":16540445,"url":"https://github.com/sameersbn/docker-runner-gitlab","last_synced_at":"2025-10-28T14:31:38.292Z","repository":{"id":16311232,"uuid":"19060205","full_name":"sameersbn/docker-runner-gitlab","owner":"sameersbn","description":"A CI runner for gitlab-ce built on top of the https://github.com/sameersbn/docker-gitlab-ci-runner","archived":false,"fork":false,"pushed_at":"2015-12-13T08:34:12.000Z","size":27,"stargazers_count":27,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T00:52:05.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameersbn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-23T07:00:31.000Z","updated_at":"2024-05-02T00:52:05.889Z","dependencies_parsed_at":"2022-09-15T05:51:27.812Z","dependency_job_id":null,"html_url":"https://github.com/sameersbn/docker-runner-gitlab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-runner-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-runner-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-runner-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-runner-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameersbn","download_url":"https://codeload.github.com/sameersbn/docker-runner-gitlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859404,"owners_count":16556036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T18:52:28.414Z","updated_at":"2025-10-28T14:31:33.020Z","avatar_url":"https://github.com/sameersbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **NOTICE**:\n\u003e\n\u003e End-Of-Life.\n\n# Table of Contents\n- [Introduction](#introduction)\n- [Contributing](#contributing)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Data Store](#data-store)\n- [Shell Access](#shell-access)\n- [Upgrading](#upgrading)\n\n# Introduction\n\nA CI runner for gitlab-ce.\n\nBuilt on top of the [sameersbn/gitlab-ci-runner](https://github.com/sameersbn/docker-gitlab-ci-runner) base image, this repo demonstrates the use of sameersbn/gitlab-ci-runner to build a runner for your project.\n\nSince we inherit the [sameersbn/gitlab-ci-runner](https://github.com/sameersbn/docker-gitlab-ci-runner) base image, we also inherit its runtime. This means we only have to setup the image to satisfy your projects build requirements which in this case is gitlab-ce.\n\nAll package installations are performed in the [Dockerfile](https://github.com/sameersbn/docker-runner-gitlab/blob/master/Dockerfile) while the system configuration, such as mysql and redis setup, are performed in the [install](https://github.com/sameersbn/docker-runner-gitlab/blob/master/assets/setup/install) script.\n\nRest of this document describes use of the runner to perform continuous integration of gitlab-ce.\n\n# Contributing\n\nIf you find this image useful here's how you can help:\n\n- Send a Pull Request with your awesome new features and bug fixes\n- Help new users with [Issues](https://github.com/sameersbn/docker-runner-gitlab/issues) they may encounter\n- Support the development of this image with a [donation](http://www.damagehead.com/donate/)\n\n# Installation\n\nPull the latest version of the image from the docker index.\n\n```bash\ndocker pull sameersbn/runner-gitlab:latest\n```\n\nAlternately you can build the image yourself.\n\n```bash\ngit clone https://github.com/sameersbn/docker-runner-gitlab.git\ncd docker-runner-gitlab\ndocker build --tag=\"$USER/runner-gitlab\" .\n```\n\n# Quick Start\nFor a runner to do its trick, it has to first be registered/authorized on the GitLab CI server. This can be done by running the image with the **app:setup** command.\n\n```bash\nmkdir -p /opt/runner-gitlab\ndocker run --name runner-gitlab -i -t --rm \\\n\t-v /opt/runner-gitlab:/home/gitlab_ci_runner/data \\\n  sameersbn/runner-gitlab:latest app:setup\n```\n\nThe command will prompt you to specify the location of the GitLab CI server and provide the registration token to access the server. With this out of the way the image is ready, lets get is started.\n\n```bash\ndocker run --name runner-gitlab -d \\\n\t-v /opt/runner-gitlab:/home/gitlab_ci_runner/data \\\n\tsameersbn/runner-gitlab:latest\n```\n\nYou now have the runner to perform continous integration of GitLab CE.\n\nLogin to your GitLab CI server and add a CI build for gitlab-ce with the following build settings\n\n```bash\nruby -v\ncp config/database.yml.mysql config/database.yml\ncp config/gitlab.yml.example config/gitlab.yml\nsed \"s/username\\:.*$/username\\: runner/\" -i config/database.yml\nsed \"s/password\\:.*$/password\\: 'password'/\" -i config/database.yml\nsed \"s/gitlabhq_test/gitlabhq_test_$((RANDOM/5000))/\" -i config/database.yml\ntouch log/application.log\ntouch log/test.log\nbundle --without postgres\nbundle exec rake db:create RAILS_ENV=test\nbundle exec rake gitlab:test RAILS_ENV=test\n```\n\n# Data Store\nGitLab CI Runner saves the configuration for connection and access to the GitLab CI server. In addition, SSH keys are generated as well. To make sure this configuration is not lost when when the container is stopped/deleted, we should mount a data store volume at\n\n* /home/gitlab_ci_runner/data\n\nVolumes can be mounted in docker by specifying the **'-v'** option in the docker run command.\n\n```bash\nmkdir /opt/runner-gitlab\ndocker run --name runner-gitlab -d -h runner-gitlab.local.host \\\n  -v /opt/runner-gitlab:/home/gitlab_ci_runner/data \\\n  sameersbn/runner-gitlab:latest\n```\n\n# Shell Access\n\nFor debugging and maintenance purposes you may want access the containers shell. If you are using docker version `1.3.0` or higher you can access a running containers shell using `docker exec` command.\n\n```bash\ndocker exec -it runner-gitlab bash\n```\n\nIf you are using an older version of docker, you can use the [nsenter](http://man7.org/linux/man-pages/man1/nsenter.1.html) linux tool (part of the util-linux package) to access the container shell.\n\nSome linux distros (e.g. ubuntu) use older versions of the util-linux which do not include the `nsenter` tool. To get around this @jpetazzo has created a nice docker image that allows you to install the `nsenter` utility and a helper script named `docker-enter` on these distros.\n\nTo install `nsenter` execute the following command on your host,\n\n```bash\ndocker run --rm -v /usr/local/bin:/target jpetazzo/nsenter\n```\n\nNow you can access the container shell using the command\n\n```bash\nsudo docker-enter runner-gitlab\n```\n\nFor more information refer https://github.com/jpetazzo/nsenter\n\n## Upgrading\n\nTo update the runner, simply stop the image and pull the latest version from the docker index.\n\n```bash\ndocker stop runner-gitlab\ndocker pull sameersbn/runner-gitlab:latest\ndocker run --name runner-gitlab -d [OPTIONS] sameersbn/runner-gitlab:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-runner-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameersbn%2Fdocker-runner-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-runner-gitlab/lists"}