docker快速部署gitlab

docker安装gitlab
https://docs.gitlab.com/omnibus/docker/
使用文档:
https://docs.gitlab.com.cn/ce/gitlab-basics/README.html
git使用:
http://blog.jobbole.com/25775/

拉取镜像:
docker pull gitlab/gitlab-ce

运行gitlab

sudo docker run --detach \

--hostname 10.39.10.223 \
--publish 443:443 --publish 80:80 --publish 2222:22 \
--name gitlab \
--restart always \
--volume /data0/gitlab/config:/etc/gitlab \
--volume /data0/gitlab/logs:/var/log/gitlab \
--volume /data0/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

运行成功后,即可通过80访问页面,2222为ssh端口。

配置gitlab服务器的访问地址
修改gitlab的配置文件
vi /data0/gitlab/config/gitlab.rb

配置http协议所使用的访问地址,此处为主机ip地址:

external_url 'http://10.39.10.223'

修改gitlab.rb配置文件之后,重启容器。或者在容器里执行gitlab-ctl reconfigure命令

http://10.39.3.23

Command line instructions

Git global setup

git config --global user.name "dataqa"
git config --global user.email "[email protected]"

Create a new repository

原文链接

猜你喜欢

转载自blog.csdn.net/weixin_40581617/article/details/84564844