有两种方法搭建gitlab,一种下载安装包安装,一种是使用docker安装
一、使用docker安装(推荐)
系统环境:CentOS 7
git版本:/gitlab/gitlab-ce
1.安装docker
建议安装时关闭防火墙:systemctl disable firewalld
安装:yum -y install docker
启动:systemctl start docker
开机启动:systemctl enable docker
2、拉取镜像文件
查看镜像文件,没拉取之前是没有任何镜像的:docker images
搜索镜像:docker search gitlab
下载第一个
#拉取镜像
docker pull gitlab/gitlab-ce
#查看镜像
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gitlab/gitlab-runner latest 5709b0c004e5 4 days ago 511MB
gitlab/gitlab-ce latest 4ee362fd95cf 4 days ago 2.09GB
3、运行gitlab容器
#注意,确保80端口没有占用,如果占用,可使用其他端口(例如5678:5678)
docker run --name