【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
拉取镜像
docker pull gitlab/gitlab-runner:latest
生成容器
docker run -d \
--name gitlab-runner \
--restart always \
-v /gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
进入容器
docker exec -it gitlab-runner /bin/bash
注册runner,并按如下提示输入:
gitlab-runner register
> Please enter the gitlab-ci coordinator URL
https://code.weflys.com
> Please enter the gitlab-ci token for this runner
in1dadgmRQMyso-C9bzW
> Please enter the gitlab-ci description for this runner
gitlab-runner
> Please enter the gitlab-ci tags for this runner
xz-ads3
> Please enter the executor:
shell
完成
回到gitlab系统即可看到runner
来源:oschina
链接:https://my.oschina.net/qiongtaoli/blog/3144594