docker-compose部署

1,安装docker,docker-compose

2,编辑docker-compose.yaml

version: '3.3'

services:

  gitlab:
    image: 'gitlab/gitlab-ce:latest'
    restart: always
    container_name: gitlab
    hostname: 'dbascripts.cn'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://dbascripts.cn:8083'
        gitlab_rails['gitlab_shell_ssh_port'] = 10022
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - '8083:8083'
      - '10022:22'
    volumes:
      - ./gitlab/config:/etc/gitlab
      - ./gitlab/logs:/var/log/gitlab
      - ./gitlab/data:/var/opt/gitlab

3,启动docker容器

docker-compose -f docker-compose.yaml up -d

4,新版本没有提示登录密码,默认root密码在 ./config/initial_root_password

  • No labels