用docker搭建gitlab

xiaoxiao2021-02-28  12

1. 下载docker安装包 [可选] 2. 安装lrzsz [可选] 3. 上传deb包到服务器 4. `dpkg -i docker-ce_18.03.0_ce-0_ubuntu_amd64.deb` [可选] 如果缺少依赖   4.1 apt-get upgrade 4.2 apt-get -f install 5 [可选]配置中国镜像源 5.1 `vim  /etc/docker/daemon.json` ``` {   "registry-mirrors": [ "https://pee6w651.mirror.aliyuncs.com"] } ``` 5.2 `systemctl daemon-reload` 5.3 `systemctl restart docker` 6.拉去gitlba镜像 `docker pull twang2218/gitlab-ce-zh:10.6` 7.安装docker-compose 8.后面内容参考 `https://hub.docker.com/r/twang2218/gitlab-ce-zh/` 9.最后的 docker-compose.yml ``` version: '3' services:     gitlab:       image: 'twang2218/gitlab-ce-zh:latest'       restart: unless-stopped       hostname: '192.168.0.28'       environment:         TZ: 'Asia/Shanghai'         GITLAB_OMNIBUS_CONFIG: |           #external_url 'http://192.168.0.28'           gitlab_rails['time_zone'] = 'Asia/Shanghai'           # 需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。           # 比如下面的电子邮件的配置:           # gitlab_rails['smtp_enable'] = true           # gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"           # gitlab_rails['smtp_port'] = 465           # gitlab_rails['smtp_user_name'] = "xxxx@xx.com"           # gitlab_rails['smtp_password'] = "password"           # gitlab_rails['smtp_authentication'] = "login"           # gitlab_rails['smtp_enable_starttls_auto'] = true           # gitlab_rails['smtp_tls'] = true           # gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com'           gitlab_rails['gitlab_shell_ssh_port'] = 222       ports:         - '8080:80'         - '443:443'         - '222:22'       volumes:         - config:/etc/gitlab         - data:/var/opt/gitlab         - logs:/var/log/gitlab volumes:     config:     data:     logs: ```
转载请注明原文地址: https://www.6miu.com/read-1650396.html

最新回复(0)