Docker安装gitlab-runner 并注册

安装 docker

[root@sannian wode.bak]#  curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

下载 gitlab-runner

[root@sannian wode.bak]# docker search gitlab-runner
[root@sannian wode.bak]# docker pull gitlab/gitlab-runner

运行runner

[root@sannian wode.bak]# docker run -d --name gitlab-runner --restart always gitlab/gitlab-runner

注册

[root@sannian wode.bak]# docker exec -it gitlab-runner gitlab-ci-multi-runner register
Runtime platform                                    arch=amd64 os=linux pid=11 revision=cf91d5e1 version=11.4.2
Running in system-mode.                            
                                                   
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://www.1314916.com:9999/
Please enter the gitlab-ci token for this runner:
_8iT1NFZVqf_yq2xDdH2
Please enter the gitlab-ci description for this runner:
[27b613653221]: 1314916
Please enter the gitlab-ci tags for this runner (comma separated):
14^H^C[root@sannian wode.bak]# docker exec -it gitlan-runner gitlab-ci-multi-runner register
Runtime platform                                    arch=amd64 os=linux pid=20 revision=cf91d5e1 version=11.4.2
Running in system-mode.                            
                                                   Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://www.1314916.com:9999/
Please enter the gitlab-ci token for this runner:
_8sdffsfdfFZdfqf_yq2xDdH2
Please enter the gitlab-ci description for this runner:
[27b613653221]: 1314916
Please enter the gitlab-ci tags for this runner (comma separated):
1314916
Registering runner... succeeded                     runner=_8iT1NFZ
Please enter the executor: docker+machine, docker-ssh+machine, docker, docker-ssh, parallels, shell, ssh, virtualbox, kubernetes:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 
[root@sannian wode.bak]# docker exec -it gitlan-runner gitlab-ci-multi-runner list
Runtime platform                                    arch=amd64 os=linux pid=32 revision=cf91d5e1 version=11.4.2
Listing configured runners                          ConfigFile=/etc/gitlab-runner/config.toml
1314916                                             Executor=shell Token=761fdc8eaeb675c81f28edaadc7e3e URL=http://www.1314916.com:9999/

然后在web上查看

4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值