主机ip:192.168.1.139
[root@localhost gitlab_docker]# cat docker-compose.yml
version: '3.1'
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
container_name: gitlab
#随着docker重启自动启动
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
#宿主机ip
external_url 'http://192.168.1.139:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
#端口号映射
ports:
- '8929:8929'
- '2224:2224'
#数据卷映射
volumes :
- './config:/etc/gitlab'
- './logs:/var/1og/gitlab'
- './data:/var/opt/gitlab'
标签:compose,ip,2224,gitlab,docker,8929
From: https://www.cnblogs.com/sddll/p/18070148