docker pull gitlab/gitlab-ee:12.3.5-ee.0
mkdir /data/app/gitlab/etc
mkdir /data/app/gitlab/log
mkdir /data/app/gitlab/data
docker run --hostname 你的IP地址 --publish https端口:443 --publish http端口:80 --name gitlab --restart unless-stopped -v /data/app/gitlab/etc:/etc/gitlab -v /data/gitlab/log:/var/log/gitlab -v /data/app/gitlab/data:/var/opt/gitlab gitlab/gitlab-ee:12.3.5-ee.0
这时候会一直run 一直到log就能直接打开了
此时原版镜像已经OK了能访问了。。。。。。。。。。。。
参考文章:https://www.cnblogs.com/sunhongleibibi/p/12072689.html(汉化部分)
docker exec -it 容器ID bash
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
wget https://gitlab.com/xhang/gitlab/-/archive/v12.3.5-zh/gitlab-v12.3.5-zh.tar.gz
tar -zxf gitlab-v12.3.5-zh.tar.gz
gitlab-ctl stop
cp -fr /opt/gitlab/embedded/service/gitlab-rails{,gao-`date %Y%m%d`}
cp -rf ./gitlab-v12.3.5-zh/* /opt/gitlab/embedded/service/gitlab-rails/
复制的过程中出现这2句是没问题的
cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/log’ with directory ‘./log’
cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/tmp’ with directory ‘./tmp’
gitlab-ctl reconfigure
gitlab-ctl restart
exit
docker restart 容器ID
访问中有可能出现502 那请重复1,7步 重新启动gitlab服务
来源:https://www.icode9.com/content-4-735851.html
联系客服