Set up their own code hosting platform for a GitLab

https://about.gitlab.com

A GitLab set up their own open source, you can either use third-party code hosting, you can also set up their own;

  1. docker pull twang2218/gitlab-ce-zh

  2. cd /usr/local/

  3. mkdir docker

  4. cd docker/

  5. mkdir gitlab

  6. cd gitlab/

  7. vi Docker-compose.yml

    Configuration File

     version:'3'
     services:
             web:
                     image:'twang2218/gitlab-ce-zh:10.5'
                     restart:always
                     hostname:'192.168.0.148'
                     environment:
                             TZ:'Asia/Shanghai'
                             GITLAB_OMNIBUS_CONFIG:
                                     external_url 'http://192.168.0.148:8080'
                                     gitlab_rails['gitlab_shell_ssh_port'] = 2222
                                     unicorn['port'] = 8080
                                     nginx['listen_port'] = 8080
                     ports:
                             - '8080:8080'
                             - '8443:443'   //http 请求端口
                             - '2222:22'
                     volumes:
                             - /usr/local/docker/gitlab/config:/etc/gitlab
                             - /usr/local/docker/data:/var/opt/gitlab
                             - /usr/local/docker/gitlab/logs:/var/log/gitlab
  8. docker-compose up

  9. 192.168.0.148 access

Guess you like

Origin www.cnblogs.com/cgy-home/p/11234405.html