Gitlab相关

安装

docker hub 地址
docker pull gitlab/gitlab-ce
docker pull store/gitlab/gitlab-ce:10.2.4-ce.0

1
2
3
4
5
6
7
8
9
10
11
12
sudo docker run --detach \
--hostname www.operatorworld.win \
--publish 443:443 \
--publish 80:80 \
--publish 1822:22 \
--publish 8443:8443 \
--name gitlab \
--restart always \
--volume /home/Gitlab/config:/etc/gitlab \
--volume /home/Gitlab/logs:/var/log/gitlab \
--volume /home/Gitlab/data:/var/opt/gitlab \
store/gitlab/gitlab-ce:10.2.4-ce.0

中文版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
获取当前Docker中的安装版本
gitlab_version=$(cat /opt/gitlab/embedded/service/gitlab-rails/VERSION)

Clone对应全镜像
git clone https://gitlab.com/xhang/gitlab.git

切换目录
cd gitlab

生成对应版本的中文对比文件
git diff v${gitlab_version} v${gitlab_version}-zh > ../${gitlab_version}-zh.diff

停止Gitlab
gitlab-ctl stop

导入汉化文件
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../11.0.1-zh.diff

重配置
gitlab-ctl reconfigure

然后启动gitlab
gitlab-ctl start