首页 > 其他 > 详细

docker搭建gitlab

时间:2018-03-05 10:53:06      阅读:167      评论:0      收藏:0      [点我收藏+]
docker搭建gitlab

在服务器上直接安装gitlab,会装入Git,Redis ,postgresql,nginx等。如果主机已有redis、nginx等,配置会比较麻烦。而且以后gitlab的备份和迁移都不方便。附主机安装教程:

https://about.gitlab.com/downloads/#centos7 
https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/12

如果将gitlab进行Docker化部署,所有服务如redis,postgresql等放在一个docker容器里,将配置、数据等文件挂载在宿主机上,备份和迁移时候只要复制docker镜像和挂载的数据目录即可。

运行gitlab容器

#查找镜像
[root@cloud ~]# docker search gitlab


INDEX       NAME                                               DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/gitlab/gitlab-ce                         GitLab Community Edition docker image base...   946                  [OK]
docker.io   docker.io/sameersbn/gitlab                         Dockerized gitlab web server                    803                  [OK]
docker.io   docker.io/gitlab/gitlab-runner                                                                     143                  [OK]
docker.io   docker.io/gitlab/gitlab-ee                         GitLab Enterprise Edition docker image bas...   47                   # 拉取镜像
docker pull docker.io/gitlab/gitlab-ce

# 启动镜像(使用桥接网络启动docker)
docker run --detach     --publish 9443:443 --publish 9080:80 --publish 9022:22     --name gitlab     --restart always   --volume /app/gitlab/config:/etc/gitlab --volume /app/gitlab/logs:/var/log/gitlab --volume /app/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce

浏览器打开http://132.97.xxx.xxx:9080   即可访问到gitlab

gitlab初始用户名/密码:

username: root

password: 5iveL!fe 


docker搭建gitlab

原文:http://blog.51cto.com/2179425/2082899

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!