jetsung GitLab Runner:GitLab 构建工具使用 gitlab-runner register \ --executor docker \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock \ --docker-image "docker:latest" \ --docker-privileged=false \ --env TZ=CST-8 主机 https://docs.gitlab.com/runner/install/linux-manually.html curl -L https://framagit.org/jetsung/sh-files/-/raw/main/sh/gitlab-runner.sh | bash cd /etc/gitlab-runner/ curl -L -O https://jihulab.com/-/snippets/229/raw/main/gitlab-runner-register.sh chmod +x gitlab-runner-register.sh Docker https://docs.gitlab.com/runner/install/docker.html # 指定 Volume docker run -d --name gitlab-runner --restart always \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:latest # 不指定 Volume docker volume create gitlab-runner-config docker run -d --name gitlab-runner --restart always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v gitlab-runner-config:/etc/gitlab-runner \ gitlab/gitlab-runner:latest # 运行 docker exec -it gitlab-runner gitlab-runner register \ --executor docker \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock \ --docker-image "docker:latest" \ --docker-privileged=false \ --env TZ=CST-8 https://docs.gitlab.com/runner/
jetsung 删除 Runner gitlab-runner unregister --token= --url= # 或者 gitlab-runner verify --delete --token= --url=