使用Docker快速搭建Gitlab

使用Docker快速搭建Gitlab


1.配置docker swarm環境

參考:https://www.cnblogs.com/yjb007/p/9669908.html

2.修改linux host centos 7.4的默認ssh端口爲1234

sed -i 's$#Port 22$Port 1234$g' /etc/ssh/sshd_config
systemctl restart sshd

3.安裝Gitlab

yum update -y nss curl libcurl
mkdir -p /soft/
cd /soft/
git clone https://github.com/yjb007/gitlab.git
cd gitlab
sh build.sh
mkdir -p /srv/volume/git/{data,logs,config}
sh service.sh

4.訪問Gitlab: http://git.local.com

cat /etc/hosts
10.1.1.238 git.local.com
#需要在hosts文件中綁定域名IP地址

5.修改訪問Gitlab使用的域名,必須要在下面的位置進行設置

vim service.sh
--hostname git.local.com \

Gitlab CE版本目前的tag列表:https://hub.docker.com/r/gitlab/gitlab-ce/tags/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章