GitLab - 安装 - docker
注意:以下脚本是 走的http模式,而不是https模式
gitlab: image: gitlab/gitlab-ce restart: always hostname: '81.70.22.100' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://81.70.22.100:8443' nginx['redirect_http_to_https'] = false letsencrypt['enable'] = false ports: - 8443:8443 volumes: - ./data:/var/opt/gitlab - ./logs:/var/log/gitlab - ./config:/etc/gitlab
gitlab-runner
基于容器执行注册
docker exec -it gitlab-runner gitlab-ci-multi-runner register --non-interactive --tls-ca-file /home/data/gitlab-runner/certs/ca.crt --url https://81.70.22.100:8443/ --registration-token dPvKQXAFiajhHEzVLzsF --name hello-world-runner --tag-list master --executor shell --locked true --run-untagged false #是否可以执行未知tag的job
原生安装执行注册
gitlab-runner register --non-interactive --tls-ca-file /home/data/gitlab-runner/certs/ca.crt --url https://81.70.22.100:8443/ --registration-token dPvKQXAFiajhHEzVLzsF --name hello-world-runner --tag-list master --executor shell --locked true --run-untagged false #是否可以执行未知tag的job