ubuntu 20.04
使用官方镜像:docker pull gitlab/gitlab-ce:latest
跳过服务器安装与docker安装
docker-compose.yml
version: 'XXX'
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
container_name: gitlab
restart: always
environment:
GITLAB_OMNIBUS_CONFIG:
external_url 'http://gitlab6.yfyun.gtland:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '8929:8929'
- '2224:2224'
volumes:
- './config:/etc/gitlab'
- './log:/var/log/gitlab'
- './data:/var/opt/gitlab'
docker-compose up -d
docker-compose logs -f
查看安装过程,直接信息不再滚动。
通过命令获得root密码
docker exec gitlab-ce 'cat /etc/gitlab/initial_root_password'