Gitlab
docker run \
-itd \
-p 9999:80 \
-p 9998:22 \
-v /etc/gitlab:/etc/gitlab \
-v /usr/local/store/gitlab/log:/var/log/gitlab \
-v /usr/local/store/gitlab/data:/var/opt/gitlab \
--restart always \
--privileged=true \
--name gitlab \
gitlab/gitlab-ce
docker exec -it gitlab /bin/bash
vi /etc/gitlab/gitlab.rb
external_url 'http://192.168.147.23'
gitlab_rails['gitlab_ssh_host'] = '192.168.147.23'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab-ctl reconfigure
gitlab-ctl restart
exit
配置文件 (gitlab.rb)
external_url 'http://IP地址'
gitlab_rails['gitlab_ssh_host'] = 'IP地址'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
重置 root 密码
gitlab-rails console -e production
user = User.where(id:1).first
user.password = "密码"
user.password_confirmation = "密码"
user.save!
|