# docker exec -it gitlab-runner-java01 gitlab-runner register Runtime platform arch=amd64 os=linux pid=24 revision=5316d4ac version=14.6.0 Running in system-mode. Enter the GitLab instance URL (for example, https://gitlab.com/): <这里输入gitlab私仓的url> Enter the registration token: <这里输入runner的token> Enter a description for the runner: [007fa02670d1]: <给这个runner起个名字,会显示在gitlab中> Enter tags for the runner (comma-separated): <这里输入tag,跑任务的时候可以通过 tags 来指定> Registering runner... succeeded runner=rANP_dLs Enter an executor: docker, docker-ssh, parallels, shell, virtualbox, docker+machine, custom, ssh, docker-ssh+machine, kubernetes: <运行方式,这里写 docker> Enter the default Docker image (for example, ruby:2.6): <默认运行容器,如果在job中不指定容器,默认采用的运行容器,这里我添了 tico/docker> Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
#修改对应的配置项目: # https related config https: # https port for harbor, default is 443 port: 10443 # The path of cert and key files for nginx certificate: /root/harbor_cert/server.crt private_key: /root/harbor_cert/server.key #保存
#使配置生效 ./prepare
#重启Harbor docker-compose down -v docker-compose up -v
Docker in Docker(dind) image可以用于Jenkins做build, 可以在一台机器上起多个docker image,每个image里面安装不同的第三方,形成不同的build环境,然后可以将待编译的代码SCP或GIT过去,用指定账号SSH来进行编译,达到一个机器多种编译环境的效果,提高了效率。Docker in Docker(dind) 镜像基于centos7,可用于jenkins打包编译: