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

搭建成功!

相关推荐
不倒翁玩偶11 小时前
Gitlab拉取代码token换成账号密码登录
gitlab
xixingzhe213 小时前
ubuntu安装gitlab
linux·ubuntu·gitlab
切糕师学AI2 天前
GitLab 是什么?
gitlab
明月心9523 天前
git remote add 用法
gitlab
only_Klein4 天前
jenkins流水线报错:Connection reset by peer
ci/cd·kubernetes·gitlab·jenkins·ssl
梁萌5 天前
docker部署gitlab和gitlab runner
docker·eureka·gitlab
johnnyAndCode5 天前
Idea 设置GitLab时使用账密,而不是token的配置方法
gitlab·idea
天外飞雨5 天前
Gitlab使用
gitlab
BUTCHER55 天前
GitLab SSH 密钥配置
运维·ssh·gitlab
明月心9525 天前
GitLab使用
gitlab