Bootstrap

docker安装gitlab-runner

一、docker安装gitlab
见上一篇博文https://blog.csdn.net/lisongyue123/article/details/110872692
二、安装gitlab-runner
1.拉取镜像

docker pull gitlab/gitlab-runner

2.创建容器并运行

docker run -d --name gitlab-runner --restart always -v /src/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock docker.io/gitlab/gitlab-runner:latest

3.注册

#进入容器,在容器里注册gitlab-runner
[root@localhost ~]# docker exec -it gitlab-runner bash
root@2ec71053e659:/# gitlab-runner register
Runtime platform                                    arch
;