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文件中

搭建成功!

相关推荐
极小狐4 小时前
极狐GitLab 议题权重有什么作用?
开发语言·数据库·chrome·c#·gitlab
极小狐5 小时前
极狐GitLab 的压缩和合并是什么?
运维·git·ssh·gitlab·github
极小狐12 小时前
极狐GitLab 合并请求依赖如何解决?
运维·git·ssh·gitlab·github
极小狐2 天前
极狐GitLab 项目功能和权限解读
运维·git·安全·gitlab·极狐gitlab
宁酱醇2 天前
GitLab_密钥生成(SSH-key)
运维·ssh·gitlab
极小狐2 天前
极狐GitLab 如何 cherry-pick 变更?
人工智能·git·机器学习·gitlab
云攀登者-望正茂2 天前
60个GitLab CI/CD 面试问题和答案
ci/cd·gitlab·devops
懿瑾2 天前
GitLab Auth2授权-Express + passport-gitlab2
gitlab·angular.js
zhang23839061543 天前
IDEA add gitlab account 提示
java·gitlab·intellij-idea·idea
宁酱醇3 天前
各种各样的bug合集
开发语言·笔记·python·gitlab·bug