gitlab代码控制平台搭建

docker-compose容器化gitlab

  • docker-compose安装
c 复制代码
# 官方链接(不推荐,太慢了)
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# 下面的官方链接会快一点
curl -L https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

# 修改文件权限
chmod +x /usr/local/bin/docker-compose

# 查看 docker-compose 版本
docker-compose --version
  • docker-compose.yml文件
c 复制代码
version: '3.6'
services:
  web:
    image: 'registry.gitlab.cn/omnibus/gitlab-jh:latest'
    restart: always
    hostname: 'gitlab.example.com'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://gitlab.example.com:8929'
        gitlab_rails['gitlab_shell_ssh_port'] = 2224
    ports:
      - '8929:8929'
      - '2224:22'
    volumes:
      - '$GITLAB_HOME/config:/etc/gitlab'
      - '$GITLAB_HOME/logs:/var/log/gitlab'
      - '$GITLAB_HOME/data:/var/opt/gitlab'
    shm_size: '256m'
  • 初始密码
c 复制代码
用户名root
/config/initial_root_password文件中

搭建成功!

相关推荐
一念一花一世界1 天前
DevOps实战(12) - 使用Arbess+GitLab实现Java项目构建并将制品上传Aliyun OSS
阿里云·ci/cd·gitlab·devops·arbess
自己的九又四分之三站台1 天前
GitLab:定义、起源与发展历史
gitlab
bloglin999991 天前
gitlab内网配置https配置加载异常
网络协议·https·gitlab
TO_ZRG2 天前
Unity PackageManager
unity·gitlab
行走的陀螺仪2 天前
GitLab CI/CD 完整教学指南
前端·ci/cd·gitlab·团队开发·自动化测试部署
HIT_Weston2 天前
44、【Ubuntu】【Gitlab】拉出内网 Web 服务:http.server 分析(一)
前端·ubuntu·gitlab
一念一花一世界2 天前
DevOps实战(10) - 使用Arbess+GitLab+Hadess实现Java项目构建并上传制品
ci/cd·gitlab·devops·arbess
HIT_Weston3 天前
45、【Ubuntu】【Gitlab】拉出内网 Web 服务:http.server 分析(二)
前端·http·gitlab
询问QQ:276998853 天前
基于手肘法的kmeans聚类数在Matlab中的精确识别:风电与光伏功率分析
gitlab
HIT_Weston5 天前
43、【Ubuntu】【Gitlab】拉出内网 Web 服务:静态&动态服务
前端·ubuntu·gitlab