docker-compose启动gitlab

version: '3'

services:
  gitlab:
    container_name: gitlab
    image: gitlab/gitlab-ce:latest
    privileged: true
    hostname: 'mygitlab.com'
    environment:
        TZ: 'Asia/Shanghai'
        GITLAB_OMNIBUS_CONFIG: |
          external_url 'http://mygitlab.com:10080'
          gitlab_rails['gitlab_shell_ssh_port'] = 10022
    volumes:
      - ./data/config:/etc/gitlab
      - ./data/logs:/var/log/gitlab
      - ./data/data:/var/opt/gitlab
    ports:
      - "10080:10080"
      - "14443:443"
      - "10022:22"

建议在 Linux 上部署, windows 上我尝试了各种方法, 都有各种各样的问题.Mac OS 没有用过, 不做评价.

推荐阅读更多精彩内容