欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Gitlab CI/CD

程序员文章站 2022-05-31 19:59:28
...
  1. docker启动runner命令:
sudo docker run -d --name gitlab-runner --restart always -v /home/vito/gitlab-runner/config:/etc/gitlab-runner -v /home/vito/gitlab-runner/gitlab-runner/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest

挂在的两个目录:
-v /home/vito/gitlab-runner/config:/etc/gitlab-runner
-v /home/vito/gitlab-runner/gitlab-runner/run/docker.sock:/var/run/docker.sock

  1. 给gitlab-runner赋可执行权限
sudo chmod +x gitlab-runner
  1. 注册runner
sudo docker exec -it gitlab-runner gitlab-ci-multi-runner register
相关标签: gitlab