https://qiita.com/ryuichi1208/items/1c08523b0ef34d05026f
# gitlab-runnerインストール
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
sudo yum install gitlab-runner
https://docs.gitlab.com/omnibus/docker/
# dockerでGitlab起動
export GITLAB_HOME=/srv
export GITLAB_HOME=$HOME
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/gitlab/config:/etc/gitlab \
--volume $GITLAB_HOME/gitlab/logs:/var/log/gitlab \
--volume $GITLAB_HOME/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
# 起動確認
sudo docker logs -f gitlab
# gitlab-runnerの設定
[root@localhost aaa]# sudo gitlab-runner register
Runtime platform arch=amd64 os=linux pid=5462 revision=c127439c version=13.0.0
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://gitlab.example.com
Please enter the gitlab-ci token for this runner:
ivi_dYcZkZBRuvA69dDF
Please enter the gitlab-ci description for this runner:
[localhost.localdomain]:
Please enter the gitlab-ci tags for this runner (comma separated):
docker
Registering runner... succeeded runner=ivi_dYcZ
Please enter the executor: docker-ssh+machine, kubernetes, ssh, virtualbox, docker-ssh, parallels, shell, docker+machine, custom, docker:
docker
Please enter the default Docker image (e.g. ruby:2.6):
alpine:latest
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
# 以下を一緒にcommit pushすると動く
[root@localhost aaa]# cat .gitlab-ci.yml
stages:
- test
test_job:
type: test
script:
- gcc -o hello hello.c
- ./hello world
tags:
- docker

ちゃんと動いてないけど流れがわかったのでまあいいっか。
