vim docker-compose.yml

version: '3.1'
services:
    gitlab:
        image: 'twang2218/gitlab-ce-zh:11.1.4'
        container_name: "gitlab"
        restart: always
        privileged: true
        hostname: 'gitlab'
        environment:
         TZ: 'Asia/Shanghai'
         GITLAB_OMNIBUS_CONFIG: |
            gitlab_rails['time_zone'] = 'Asia/Shanghai'
            gitlab_rails['smtp_enable'] = true
            gitlab_rails['gitlab_shell_ssh_port'] = 22
        ports:
         - '80:80'
         - '443:443'
         - '22:22'
        volumes:
         - /opt/docker_gitlab/config:/etc/gitlab
         - /opt/docker_gitlab/data:/var/opt/gitlab
         - /opt/docker_gitlab/logs:/var/log/gitlab

docker-compose up -d