{"id":24835760,"url":"https://github.com/tobilg/gitlab-ci-runner-marathon","last_synced_at":"2025-10-14T10:30:32.263Z","repository":{"id":86825782,"uuid":"69445469","full_name":"tobilg/gitlab-ci-runner-marathon","owner":"tobilg","description":"A customized Docker image for running scalable GitLab CI runners on Marathon","archived":true,"fork":false,"pushed_at":"2020-10-15T13:55:38.000Z","size":55,"stargazers_count":15,"open_issues_count":0,"forks_count":26,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T11:59:57.854Z","etag":null,"topics":["gitlab","gitlab-ci","gitlab-runner","marathon"],"latest_commit_sha":null,"homepage":null,"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/tobilg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-28T09:02:01.000Z","updated_at":"2023-07-04T10:33:59.000Z","dependencies_parsed_at":"2023-03-28T21:47:50.898Z","dependency_job_id":null,"html_url":"https://github.com/tobilg/gitlab-ci-runner-marathon","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tobilg/gitlab-ci-runner-marathon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fgitlab-ci-runner-marathon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fgitlab-ci-runner-marathon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fgitlab-ci-runner-marathon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fgitlab-ci-runner-marathon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/gitlab-ci-runner-marathon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fgitlab-ci-runner-marathon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018780,"owners_count":26086452,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gitlab","gitlab-ci","gitlab-runner","marathon"],"created_at":"2025-01-31T04:51:41.163Z","updated_at":"2025-10-14T10:30:32.255Z","avatar_url":"https://github.com/tobilg.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-ci-runner-marathon\n\n[![Build Status](https://travis-ci.org/tobilg/gitlab-ci-runner-marathon.svg?branch=master)](https://travis-ci.org/tobilg/gitlab-ci-runner-marathon)\n[![Docker Stars](https://img.shields.io/docker/stars/tobilg/gitlab-ci-runner-marathon.svg)](https://hub.docker.com/r/tobilg/gitlab-ci-runner-marathon/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/tobilg/gitlab-ci-runner-marathon.svg)](https://hub.docker.com/r/tobilg/gitlab-ci-runner-marathon/)\n[![](https://images.microbadger.com/badges/image/tobilg/gitlab-ci-runner-marathon.svg)](http://microbadger.com/images/tobilg/gitlab-ci-runner-marathon \"Get your own image badge on microbadger.com\") \n\nA customized Docker image for running scalable GitLab CI runners on DC/OS via Marathon.\n\n## Configuration\n\nThe GitLab runner can be configured by environment variables. For a complete overview, have a look at the [docs/gitlab_runner_register_arguments.md](docs/gitlab_runner_register_arguments.md) file.\n\nThe most important ones are:\n\n* `GITLAB_SERVICE_NAME`: The Mesos DNS service name of the GitLab instance, e.g. `gitlab.marathon.mesos`. This strongly depends on your setup, i.e. how you launched GitLab and how you configured Mesos DNS. This is the recommended method to use with DC/OS installations of GitLab. Either this environment variable or `GITLAB_INSTANCE_URL` is **mandatory**.\n* `GITLAB_INSTANCE_URL`: The URL of the GitLab instance to connect to, e.g. `http://gitlab.mycompany.com`. Either this environment variable or `GITLAB_SERVICE_NAME` is **mandatory**.\n* `REGISTRATION_TOKEN`: The registration token to use with the GitLab instance. See the [docs](https://docs.gitlab.com/ce/ci/runners/README.html) for details. **(mandatory)**\n* `RUNNER_EXECUTOR`: The type of the executor to use, e.g. `shell` or `docker`. See the [executor docs](https://github.com/ayufan/gitlab-ci-multi-runner/blob/master/docs/executors/README.md) for more details. **(mandatory)**\n* `RUNNER_CONCURRENT_BUILDS`: The number of concurrent builds this runner should be able to handel. Default is `1`.\n* `RUNNER_TAG_LIST`: If you want to use tags in you `.gitlab-ci.yml`, then you need to specify the comma-separated list of tags. This is useful to distinguish the runner types.\n\n## Using private Docker registries with GitLab Runner\n\nPrivate Docker registries can be used by adding the [secret variable](https://docs.gitlab.com/ce/ci/variables/#secret-variables) `DOCKER_AUTH_CONFIG` to your project's **Settings ➔ CI/CD Pipelines** settings. Have a look at the [guide](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#using-a-private-container-registry) as well.\n\n## Run on DC/OS\n\nThis version of the GitLab CI runner for Marathon project uses Docker-in-Docker techniques, with all of its pros and cons. See also [jpetazzo's article](http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/) on this topic.\n\nIn the following examples, we assume that you're running the GitLab Universe package as service `gitlab` on the DC/OS internal Marathon instance, which is also available to the runners via the `external_url` of the GitLab configuration. This normally means that GitLab is exposed on a public agent node via marathon-lb. Please see the [example documentation here|https://github.com/dcos/examples/tree/master/1.8/gitlab].\n\n### Shell runner\n\nAn example for a shell runner. This enables the build of Docker images.\n\n```javascript\n{\n  \"id\": \"gitlab-runner-shell\",\n  \"container\": {\n    \"type\": \"DOCKER\",\n    \"docker\": {\n      \"image\": \"tobilg/gitlab-ci-runner-marathon:v13.4.1\",\n      \"network\": \"HOST\",\n      \"forcePullImage\": true,\n      \"privileged\": true\n    }\n  },\n  \"instances\": 1,\n  \"cpus\": 1,\n  \"mem\": 2048,\n  \"env\": {\n    \"GITLAB_SERVICE_NAME\": \"gitlab.marathon.mesos\",\n    \"REGISTRATION_TOKEN\": \"zzNWmRE--SBfeMfiKCMh\",\n    \"RUNNER_EXECUTOR\": \"shell\",\n    \"RUNNER_TAG_LIST\": \"shell,build-as-docker\",\n    \"RUNNER_CONCURRENT_BUILDS\": \"4\"\n  },\n  \"taskKillGracePeriodSeconds\": 15,\n  \"healthChecks\": [\n     {\n       \"path\": \"/metrics\",\n       \"portIndex\": 0,\n       \"protocol\": \"HTTP\",\n       \"gracePeriodSeconds\": 300,\n       \"intervalSeconds\": 60,\n       \"timeoutSeconds\": 20,\n       \"maxConsecutiveFailures\": 3,\n       \"ignoreHttp1xx\": false\n     }\n  ]\n}\n``` \n\n### Docker runner\n\nHere's an example for a Docker runner, which enables builds *inside* Docker containers:\n\n```javascript\n{\n  \"id\": \"gitlab-runner-docker\",\n  \"container\": {\n    \"type\": \"DOCKER\",\n    \"docker\": {\n      \"image\": \"tobilg/gitlab-ci-runner-marathon:v13.4.1\",\n      \"network\": \"HOST\",\n      \"forcePullImage\": true,\n      \"privileged\": true\n    }\n  },\n  \"instances\": 1,\n  \"cpus\": 1,\n  \"mem\": 2048,\n  \"env\": {\n    \"GITLAB_SERVICE_NAME\": \"gitlab.marathon.mesos\",\n    \"REGISTRATION_TOKEN\": \"zzNWmRE--SBfeMfiKCMh\",\n    \"RUNNER_EXECUTOR\": \"docker\",\n    \"RUNNER_TAG_LIST\": \"docker,build-in-docker\",\n    \"RUNNER_CONCURRENT_BUILDS\": \"4\",\n    \"DOCKER_IMAGE\": \"node:6-wheezy\"\n  },\n  \"taskKillGracePeriodSeconds\": 15,\n  \"healthChecks\": [\n     {\n        \"path\": \"/metrics\",\n        \"portIndex\": 0,\n        \"protocol\": \"HTTP\",\n        \"gracePeriodSeconds\": 300,\n        \"intervalSeconds\": 60,\n        \"timeoutSeconds\": 20,\n        \"maxConsecutiveFailures\": 3,\n        \"ignoreHttp1xx\": false\n      }\n  ]\n}\n```\n\nMake sure you choose a useful default Docker image via `DOCKER_IMAGE`, for example if you want to build Node.js projects, the `node:6-wheezy` image. This can be overwritten with the `image` property in the `.gitlab-ci.yml` file (see the [GitLab CI docs](https://docs.gitlab.com/ce/ci/yaml/README.html).\n\n## Usage in GitLab CI\n\n### Builds as Docker\n\nAn `.gitlab-ci.yml` example of using the `build-as-docker` tag to trigger a build on the runner(s) with shell executors:\n\n```yaml\nstages:\n  - ci\n\nbuild-job:\n  stage: ci\n  tags:\n    - build-as-docker\n  script:\n    - docker build -t tobilg/test .\n```\n\nThis assumes your project has a `Dockerfile`, for example\n\n```\nFROM nginx\n```\n\n### Builds in Docker\n\nAn `.gitlab-ci.yml` example of using the `build-in-docker` tag to trigger a build on the runner(s) with Docker executors:\n\n```yaml\nimage: node:6-wheezy\n\nstages:\n  - ci\n\ntest-job:\n  stage: ci\n  tags:\n    - build-in-docker\n  script:\n    - node --version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fgitlab-ci-runner-marathon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fgitlab-ci-runner-marathon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fgitlab-ci-runner-marathon/lists"}