*先决条件系统已安装Docker

1、查询GitLab镜像

docker search gitlab

2、现在GitLab镜像

3、创建文件夹

mkdir -p /software/gitlab/config

mkdir -p /software/gitlab/logs

mkdir -p /software/gitlab/data

4、启动

docker run -d -p 9443:443 -p 9080:80 -p 9022:22 \
--name gitlab --restart always \
--volume /software/gitlab/config:/etc/gitlab \
--volume /software/gitlab/logs:/var/log/gitlab \
--volume /software/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:lates

5、修改配置文件

vi gitlab/config/gitlab.rb

external_url 'http://gitlab.xxx.co'
gitlab_rails['gitlab_ssh_host'] = 'gitlab.xxx.co'
gitlab_rails['gitlab_shell_ssh_port'] = 9022

6、配置nginx

upstream gitlab {
    server xxx.xxx.xxx.xxx:9080;
}
server {
   listen 80;
   server_name gitlab.xxx.co;
   location / {
       client_max_body_size 10m;
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_pass http://gitlab;
    }
}

7、进入gitlab

首次进入要修改默认管理员密码 (管理员root)

Centos7 docker安装GitLab的更多相关文章

  1. Docker安装Gitlab

    一.Ubuntu16.4上Docker安装Gitlab 1.安装docker 参见:https://docs.docker.com/engine/installation/linux/ubuntuli ...

  2. centos7 部署安装gitlab服务器

    概念: git 是一种版本控制系统,是一个命令,是一种工具 gitlib 是用于实现git功能的开发库 github 是一个基于git实现的在线代码托管仓库,包含一个网站界面,向互联网开放 gitla ...

  3. 解决 Windows Docker 安装 Gitlab Volume 权限问题

    本文首发于我的个人博客,解决 Windows Docker 安装 Gitlab Volume 权限问题 ,欢迎访问! 记录一下 Windows10 下 Docker 安装 Gitlab 的步骤. Ca ...

  4. 利用docker安装gitlab

    安装docker 安装 virtualbox 下载 dockertoolbox并安装 官网的服务器一直连不上, 幸亏还有这个 https://get.daocloud.io/toolbox/ 比 ht ...

  5. docker安装gitlab并部署CICD

    摘要 本文主要实现了在docker下安装gitlab,将gitlab绑定在宿主机的180端口,将gitlab的clone的URL添加指定端口号:部署了CI/CD,并公布了测试项目. 安装docker[ ...

  6. docker 安装gitlab

    # docker 安装gitlab # 一.安装镜像(官网文档) export GITLAB_HOME=/srv/gitlab # 必须先设置它,它就是你存储代码仓库的位置.以后要移植的时候直接把这个 ...

  7. centos7下使用docker安装gitlab

    环境背景: Docker化已经成为一种热门,记录一下使用docker引擎安装gitlab的过程. 测试环境: 系统 软件 依赖 CentOS 7.4 GitLab(latest) docker-ce ...

  8. 使用docker安装gitlab

    我这里使用的系统是centos7 首先安装docker,docker-compose(非必须,但是使用它可以简化镜像启动参数),需要注意的是docker-compose安装依赖Python的pip,所 ...

  9. Docker安装GitLab与Runner(网关),常规设置,自动化用到k8s+token

    [转]图文详解k8s自动化持续集成之GitLab CI/CD Windows里面使用Debian命令行工具完成 和Docker网络相关的命令 查看某一个容器的网络 docker inspect 容器I ...

随机推荐

  1. Redis自定义fastJson Serializer

    public class FastJsonRedisSerializer<T> implements RedisSerializer<T> { public static fi ...

  2. 如何在真实串口驱动还未加载的情况下调试uboot?

    1. 先找出真实串口是什么型号 1.1 怎么找?笔者提供两种方案: 方案一: 若当前的板子支持dm,从uboot的dts找串口节点对应的compatible属性 方案二: 从linux内核的dts找串 ...

  3. js 类型判断

  4. [LeetCode] 337. House Robber III 打家劫舍 III

    The thief has found himself a new place for his thievery again. There is only one entrance to this a ...

  5. java.sql.SQLException: Zero date value prohibited

    今天使用mybatis出现了异常 java.sql.SQLException: Zero date value prohibited 查了下原因 mysql文档上写着 Datetimes with a ...

  6. Java-Readable

    import java.nio.*; import java.util.*; import static net.mindview.util.Print.*; public class RandomW ...

  7. select2的使用

    普通的select不支持搜索,当选项很多的时候,需要一个个下拉查找. 有了select2就方便多了 下载 <https://select2.org/> 引入 <link href=& ...

  8. 【python小记】访问mysql数据库

    题记: 最近因为工作需要,学习了python,瞬间对这个轻松快捷的语给吸引了,以前只知道js脚本是写网页的,没有想到python这个脚本语言的应用范围可以这么广泛,现在做一些简单或稍微复杂的操作,基本 ...

  9. 从Asp .net到Asp core (第二篇)《Asp Core 的生命周期》

    前面一篇文章简单回顾了Asp .net的生命周期,也简单提到了Asp .net与Asp Core 的区别,我们说Asp Core不在使用Asp.netRuntime,所以它也没有了web程序生命周期中 ...

  10. Mysql中类似于Oracle中connect by ... start with的查询语句(木大看懂)

    表结构 create table sys_branch ( id ) not null, parent_id ), branch_name ), delete_flag ), primary key ...