• docker run 命令转化 docker-compose


    docker run -d 
        --hostname gitlab.example.com 
        -p 80:80 
        -p 443:443 
        -p 22:22 
        --name gitlab 
        --restart unless-stopped 
        -v gitlab-config:/etc/gitlab 
        -v gitlab-logs:/var/log/gitlab 
        -v gitlab-data:/var/opt/gitlab 
        --network gitlab-net 
        twang2218/gitlab-ce-zh:11.1.4

    -p : ports   -v : volumes

    version: '2'
    services:
        gitlab:
          image: 'twang2218/gitlab-ce-zh:11.1.4'
          restart: unless-stopped
          hostname: 'gitlab.example.com'
          environment:9
            TZ: 'Asia/Shanghai'
            GITLAB_OMNIBUS_CONFIG: |
              external_url 'http://gitlab.example.com'
              gitlab_rails['time_zone'] = 'Asia/Shanghai'
              # 需要配置到 gitlab.rb 中的配置可以在这里配置,每个配置一行,注意缩进。
              # 比如下面的电子邮件的配置:
              # gitlab_rails['smtp_enable'] = true
              # gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
              # gitlab_rails['smtp_port'] = 465
              # gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
              # gitlab_rails['smtp_password'] = "password"
              # gitlab_rails['smtp_authentication'] = "login"
              # gitlab_rails['smtp_enable_starttls_auto'] = true
              # gitlab_rails['smtp_tls'] = true
              # gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com'
          ports:
            - '80:80'
            - '443:443'
            - '22:22'
          volumes:
            - config:/etc/gitlab
            - data:/var/opt/gitlab
            - logs:/var/log/gitlab
    volumes:
        config:
        data:
        logs:
  • 相关阅读:
    Android:Butter Knife 8.0.1配置
    webAPI获得链接客户端IP地址
    解决WebClient或HttpWebRequest首次连接缓慢问题
    Android Studio中有用的快捷键栏
    SQL十进制和十六进制相互转换
    SQL分组查询每组前几条数据
    POJ 1011 Sticks
    POJ 1144 Network(割点)
    求无向图中的割边(桥)
    POJ 2553 The Bottom of a Graph
  • 原文地址:https://www.cnblogs.com/ucas123/p/14160351.html
Copyright © 2020-2023  润新知