两个gitlab:12.2.1-1

两个gitlab:12.2.1-1

https://img1.sycdn.imooc.com//climg/62cd3ebd0907504109770323.jpg

为什么我这里docker重新启动的时候有两个gitlab:12.2.1-1,求解疑

正在回答

登陆购买课程后可参与讨论,去登陆

2回答


  redis:

    restart: always

    image: sameersbn/redis:4.0.9-2

    container_name: myredis

    command:

      - --loglevel warning

    volumes:

      - /D/Mineme/gitlab/redis:/var/lib/redis:Z

 

  postgresql:

    restart: always

    image: sameersbn/postgresql:10-2

    container_name: mydb

    volumes:

      - /D/Mineme/gitlab/postgresql:/var/lib/postgresql:Z

    environment:

      - DB_USER=gitlab

      - DB_PASS=password

      - DB_NAME=gitlabhq_production

      - DB_EXTENSION=pg_trgm

 

  gitlab:

    restart: always

    image: sameersbn/gitlab:12.2.1-1

    container_name: mygit



Brian 2022-07-15 20:18:02

你把你的配置文件发上来看看?!


  • 提问者 风吹尘 #1
    version: '2'
    
    services:
      redis:
        restart: always
        image: sameersbn/redis:4.0.9-2
        command:
          - --loglevel warning
        volumes:
          - /D/Mineme/gitlab/redis:/var/lib/redis:Z
    
      postgresql:
        restart: always
        image: sameersbn/postgresql:10-2
        volumes:
          - /D/Mineme/gitlab/postgresql:/var/lib/postgresql:Z
        environment:
          - DB_USER=gitlab
          - DB_PASS=password
          - DB_NAME=gitlabhq_production
          - DB_EXTENSION=pg_trgm
    
      gitlab:
        restart: always
        image: sameersbn/gitlab:12.2.1-1
        depends_on:
          - redis
          - postgresql
        ports:
          - '13800:80'
          - '13822:22'
          - '15432:5432'
          - '16379:6379'
        volumes:
          - /D/Mineme/gitlab/gitlab:/home/git/data:Z
        environment:
          - DEBUG=false
    
          - DB_ADAPTER=postgresql
          - DB_HOST=postgresql
          - DB_PORT=5432
          - DB_USER=gitlab
          - DB_PASS=password
          - DB_NAME=gitlabhq_production
    
          - REDIS_HOST=redis
          - REDIS_PORT=6379
    
    #      - TZ=Asia/Shanghai
    #      - GITLAB_TIMEZONE=Shanghai
          - TZ=Asia/Beijing
          - GITLAB_TIMEZONE=Beijing
    
          - GITLAB_HTTPS=false
          - SSL_SELF_SIGNED=false
    
          - GITLAB_HOST=127.0.0.1
          - GITLAB_PORT=13800
          - GITLAB_SSH_PORT=13822
          - GITLAB_RELATIVE_URL_ROOT=
          - GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alphanumeric-string
          - GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alphanumeric-string
          - GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alphanumeric-string
    
          - GITLAB_ROOT_PASSWORD=12345678
          - GITLAB_ROOT_EMAIL=1361944487@qq.com
    
          - GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
          - GITLAB_NOTIFY_PUSHER=false
    
          - GITLAB_EMAIL=notifications@example.com
          - GITLAB_EMAIL_REPLY_TO=noreply@example.com
          - GITLAB_INCOMING_EMAIL_ADDRESS=reply@example.com
    
          - GITLAB_BACKUP_SCHEDULE=daily
          - GITLAB_BACKUP_TIME=01:00
          - GITLAB_BACKUP_EXPIRY=604800
    
          - SMTP_ENABLED=false
          - SMTP_DOMAIN=www.example.com
          - SMTP_HOST=smtp.gmail.com
          - SMTP_PORT=587
          - SMTP_USER=mailer@example.com
          - SMTP_PASS=password
          - SMTP_STARTTLS=true
          - SMTP_AUTHENTICATION=login
    
          - IMAP_ENABLED=false
          - IMAP_HOST=imap.gmail.com
          - IMAP_PORT=993
          - IMAP_USER=mailer@example.com
          - IMAP_PASS=password
          - IMAP_SSL=true
          - IMAP_STARTTLS=false
    
          - OAUTH_ENABLED=false
          - OAUTH_AUTO_SIGN_IN_WITH_PROVIDER=
          - OAUTH_ALLOW_SSO=
          - OAUTH_BLOCK_AUTO_CREATED_USERS=true
          - OAUTH_AUTO_LINK_LDAP_USER=false
          - OAUTH_AUTO_LINK_SAML_USER=false
          - OAUTH_EXTERNAL_PROVIDERS=
    
          - OAUTH_CAS3_LABEL=cas3
          - OAUTH_CAS3_SERVER=
          - OAUTH_CAS3_DISABLE_SSL_VERIFICATION=false
          - OAUTH_CAS3_LOGIN_URL=/cas/login
          - OAUTH_CAS3_VALIDATE_URL=/cas/p3/serviceValidate
          - OAUTH_CAS3_LOGOUT_URL=/cas/logout
    
          - OAUTH_GOOGLE_API_KEY=
          - OAUTH_GOOGLE_APP_SECRET=
          - OAUTH_GOOGLE_RESTRICT_DOMAIN=
    
          - OAUTH_FACEBOOK_API_KEY=
          - OAUTH_FACEBOOK_APP_SECRET=
    
          - OAUTH_TWITTER_API_KEY=
          - OAUTH_TWITTER_APP_SECRET=
    
          - OAUTH_GITHUB_API_KEY=
          - OAUTH_GITHUB_APP_SECRET=
          - OAUTH_GITHUB_URL=
          - OAUTH_GITHUB_VERIFY_SSL=
    
          - OAUTH_GITLAB_API_KEY=
          - OAUTH_GITLAB_APP_SECRET=
    
          - OAUTH_BITBUCKET_API_KEY=
          - OAUTH_BITBUCKET_APP_SECRET=
    
          - OAUTH_SAML_ASSERTION_CONSUMER_SERVICE_URL=
          - OAUTH_SAML_IDP_CERT_FINGERPRINT=
          - OAUTH_SAML_IDP_SSO_TARGET_URL=
          - OAUTH_SAML_ISSUER=
          - OAUTH_SAML_LABEL="Our SAML Provider"
          - OAUTH_SAML_NAME_IDENTIFIER_FORMAT=urn:oasis:names:tc:SAML:2.0:nameid-format:transient
          - OAUTH_SAML_GROUPS_ATTRIBUTE=
          - OAUTH_SAML_EXTERNAL_GROUPS=
          - OAUTH_SAML_ATTRIBUTE_STATEMENTS_EMAIL=
          - OAUTH_SAML_ATTRIBUTE_STATEMENTS_NAME=
          - OAUTH_SAML_ATTRIBUTE_STATEMENTS_USERNAME=
          - OAUTH_SAML_ATTRIBUTE_STATEMENTS_FIRST_NAME=
          - OAUTH_SAML_ATTRIBUTE_STATEMENTS_LAST_NAME=
    
          - OAUTH_CROWD_SERVER_URL=
          - OAUTH_CROWD_APP_NAME=
          - OAUTH_CROWD_APP_PASSWORD=
    
          - OAUTH_AUTH0_CLIENT_ID=
          - OAUTH_AUTH0_CLIENT_SECRET=
          - OAUTH_AUTH0_DOMAIN=
    
          - OAUTH_AZURE_API_KEY=
          - OAUTH_AZURE_API_SECRET=
          - OAUTH_AZURE_TENANT_ID=


    2022-07-15 20:25:27
  • 提问者 风吹尘 #2

    老师帮忙看下

    2022-07-15 20:28:03
  • Brian 回复 提问者 风吹尘 #3

    配置文件没有问题,那就是桌面端的docker的显示问题,你可以设置container_name,举例如下:


    2022-07-17 11:50:13
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师