https://github.com/dreknix/docker-compose-gitlab-runner
Docker compose GitLab runner instance
https://github.com/dreknix/docker-compose-gitlab-runner
docker docker-compose gitlab-runner
Last synced: about 1 year ago
JSON representation
Docker compose GitLab runner instance
- Host: GitHub
- URL: https://github.com/dreknix/docker-compose-gitlab-runner
- Owner: dreknix
- License: mit
- Created: 2024-03-19T15:11:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T08:59:06.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T14:32:45.736Z (about 1 year ago)
- Topics: docker, docker-compose, gitlab-runner
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker compose instance for GitLab runner
## Register GitLab runner
Since GitLab 16.0 the process how to register a GitLab runner has changed.
### Create runner
#### Via GitLab GUI
When creating a runner the place to create a runner depends on the type of
runner (instance, group, project).
* Group runner: `Build` -> `Runners` -> `New group runner`
* Project runner: `Settings` -> `CI/CD` -> `Runners` -> `New project runner`
Get the authentication token of the runner.
### Via GitLab API
First you need an API token for creating a runner:
```
https://gitlab.example.com/-/user_settings/personal_access_tokens?name=GitLab+runner+token&scopes=read_api,create_runner
```
Create the Python GitLab configuration (`.python-gitlab.yml`):
``` console
task gitlab:create-config --
```
Create a project runner for project 4711:
``` console
$ task gitlab:runner:create-project -- 4711 "GitLab runner test instance"
id: 911
token: glrt-XXXXXXXXXXXXXXXXXXXX
```
Use the token for registering the runner.
### Register runner
After a runner is created the authentication token can be used for registering
the runner.
``` console
task gitlab:runner:register -- glrt-XXXXXXXXXXXXXXXXXXXX
```
!!! todo
Register runner with [template](
https://docs.gitlab.com/runner/register/#register-with-a-configuration-template).
## License
[MIT](https://github.com/dreknix/docker-compose-gitlab-runner/blob/main/LICENSE)