Docker安装Gitlab和Gitlab-Runner并实现项目CICD
参考:
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
完。
相关推荐
cxin 2020-11-06
synshitou 2020-10-21
Topbeyond 2020-08-21
happyfreeangel 2020-07-27
白开水 2020-07-19
无风的雨 2020-07-08
贤时间 2020-07-06
wishli 2020-06-28
leehbhs 2020-06-20
happyfreeangel 2020-06-18
83284950 2020-06-17
冯冯领队 2020-06-16
就是那个胖子 2020-06-14
83284950 2020-06-14
LiHansiyuan 2020-06-14
fcds00 2020-06-11
就是那个胖子 2020-06-11
蒜蓉粉丝蒸扇贝 2020-06-10