docker-compose build gitlab

Build step

1, and installation docker docker-compose

2, write dokcer-compose the file and start

version: '3.7'
services: 
  gitlab: 
    container_name: mygitlab
    image: 'gitlab/gitlab-ce:11.9.6-ce.0'
    restart: always
    hostname: 'yujuan.com'
    environment:
      - TZ=Asia/Shanghai
    ports:
      - '3080:80'
      - '3443:443'
      - '3022:22'
    volumes:
      - ./config:/etc/gitlab
      - ./logs:/var/log/gitlab
      - ./data:/var/opt/gitlab
    network_mode: "bridge"
    privileged: true
docker-compose up -d

3, visit localhost: 3080 into the GitLab page

localhost:3080

When we first entered, it will initialize the administrator's password, after completion of initialization here using the root/初始化密码enter gitlab page (below), follow the prompts to create a corresponding project, create a user, you can create groups

gitlab page

Precautions

Permissions issue

When building the mirror, sometimes encounter problems lead to insufficient privileges gitlab failed to start, if you encounter this error, you need to add privileged in the docker-compose file: true property

Firewall issues

Some server opens up a firewall, preventing access to port 3080, you need to manually open port 3080.

centos at how to turn the firewall can refer to:

centos firewall port and related commands

Guess you like

Origin www.cnblogs.com/jakaBlog/p/11420368.html