version: ‘3‘
services:
web:
image: ‘twang2218/gitlab-ce-zh:10.5‘
restart: always
hostname:‘域名‘
environment:
TZ: ‘Asia/Shanghai‘
GITLAB_OMNIBUS_CONFIG: |
external_url ‘http://域名或ip:port‘
gitlab_rails[‘gitlab_shell_ssh_port‘] = 2222
unicorn[‘port‘] = 8888
nginx[‘listen_port‘] = 9080
ports:
- ‘9080:80‘
- ‘8443:443‘
- ‘2222:22‘
volumes:
- /usr/local/docker/gitlab/config:/etc/gitlab
- /usr/local/docker/gitlab/data:/var/opt/gitlab
- /usr/local/docker/gitlab/logs:/var/log/gitlab
docker-compose up -d
访问 http://域名或ip:port即可
如果已经安装了nginx可能会出现冲突
原文:https://www.cnblogs.com/zzxaaas/p/14588722.html