码迷,mamicode.com
首页 > 其他好文 > 详细

Docker安装Gitlab和Gitlab-Runner并实现项目CICD

时间:2020-06-21 11:22:44      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:int   kill   color   html   ubunt   vol   blog   size   test   

参考:

https://segmentfault.com/a/1190000020593208

https://www.cnblogs.com/zzhaolei/p/11063345.html

https://docs.gitlab.com/runner/configuration/advanced-configuration.html

https://docs.gitlab.com/runner/register/#docker

https://docs.gitlab.com/runner/install/docker.html

 

可以参考下面的:

 

1、运行gitlab-runner

sudo docker run -d --name gitlab-runner --restart always             -p 8093:8093             -v /var/run/docker.sock:/var/run/docker.sock             -v /volume1/homes/pengdonglin137/gitlab-runner-config:/etc/gitlab-runner             gitlab/gitlab-runner:latest

 

2、注册

sudo docker exec -it gitlab-runner gitlab-runner register

 

3、重启

sudo docker exec -it gitlab-runner gitlab-runner restart

 

config.toml:

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "docker_runner"
  url = "http://192.168.1.102:30000/"
  token = "oMjNxBsuCqgxEBUmXRZj"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
  [runners.docker]
    tls_verify = false
    image = "ubuntu:16.04"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock","/volume1/homes/pengdonglin137/opt:/opt:rw"]
    pull_policy = "if-not-present"
    shm_size = 0

 

完。

Docker安装Gitlab和Gitlab-Runner并实现项目CICD

标签:int   kill   color   html   ubunt   vol   blog   size   test   

原文地址:https://www.cnblogs.com/pengdonglin137/p/13171543.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!