docker安装gitlab

环境准备:

1.安装docker环境的服务器(docker安装)

安装gitlab:

从docker拉取docker镜像

企业版:docker pull gitlab/gitlab-ee

社区版:docker pull gitlab/gitlab-ce

在系统新建备份目录

mkdir /Users/yingxiaoyong/app/gitlab/etc

mkdir /Users/yingxiaoyong/app/gitlab/log

mkdir /Users/yingxiaoyong/app/gitlab/data

启动gitlab

企业版启动

docker run \

--hostname 宿主机ip \

--publish 8443:443 \

--publish 80:80 \

--name gitlab \

--restart unless-stopped \

-v /Users/yingxiaoyong/app/gitlab/etc:/etc/gitlab \

-v /Users/yingxiaoyong/app/gitlab/log:/var/log/gitlab \

-v /Users/yingxiaoyong/app/gitlab/data:/var/opt/gitlab \

gitlab/gitlab-ee

 

社区版启动

docker run \

--hostname 宿主机ip \

--publish 8443:443 \

--publish 80:80 \

 

--name gitlab \

--restart unless-stopped \

-v /Users/yingxiaoyong/app/gitlab/etc:/etc/gitlab \

-v /Users/yingxiaoyong/app/gitlab/log:/var/log/gitlab \

-v /Users/yingxiaoyong/app/gitlab/data:/var/opt/gitlab \

gitlab/gitlab-ce

 

在访问网站之前,先开启80端口

开启端口后,在浏览器中输入宿主机ip能访问说明安装成功了。

docker安装gitlab_第1张图片

你可能感兴趣的:(linux服务器)