Docker gitlab安装

Docker

创建docker volumes

docker volume create volumename

Docker Install

docker run -d  -p 9901:443 -p 9902:9902 -p 9903:22 -p 8093:8093 --name gitlab -v d:\docker\gitlab\config:/etc/gitlab:Z -v d:\docker\gitlab\log:/var/log/gitlab:Z -v d:\docker\gitlab\data:/var/opt/gitlab:Z gitlab/gitlab-ce:latest

默认密码

docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password

修改密码

gitlab-rails console -e production
user=User.where(id:1).first
user.password='12345678'
user.password_confirmation='12345678'
user.save!

重新读取配置文件

gitlab-ctl reconfigure

Docker-runner

docker-runner Install

 docker run -d --name gitlab-runner --restart always -v d:\docker\gitlab-runner\config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest

若docker.sock映射到本机,会导致无法访问docker.sock,所以放在docker volumes里

docker-runner Register

gitlab-ci-multi-runner register

docker image 版本

alpine:latest
上一篇:Docker gitlab-runner安装


下一篇:剑指 Offer 33. 二叉搜索树的后序遍历序列