Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Docker to build Gitlab Code Warehouse

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article Xiaobian introduces in detail "how to use Docker to build Gitlab code warehouse", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use Docker to build Gitlab code warehouse" can help you solve your doubts.

1: download the relevant images for building gitlab: (postgresql database is used here)

# dockerpullbuj7itru.mirror.aliyuncs.com/sameersbn/gitlab:latest#dockerpullbuj7itru.mirror.aliyuncs.com/sameersbn/postgresql:9.5-3#dockerpullbuj7itru.mirror.aliyuncs.com/sameersbn/redis:latest

2: create a data storage directory:

# mkdir-p/opt/data/docker_gitlab/ {gitlab,postgresql,redis}

3: create a docker-compose file with the following configuration:

# moredocker-compose.ymlversion:'2'services:redis:restart:alwaysimage:sameersbn/redis:latestcommand:---loglevelwarningvolumes:-/opt/data/docker_gitlab/redis:/var/lib/redis:Zpostgresql:restart:alwaysimage:sameersbn/postgresql:9.5-3 volumesUSERGITLabUSERPASTER passwordDBUTERGITlabUSERVERGITlabUSING passwordDBUSTERGITLABUSING On:-redis-postgresqlports:- "10080 80"-"10022 22" volumes:-/opt/data/docker_gitlab//gitlab:/home/git/data:Zenvironment:-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/Kolkata-GITLAB_TIMEZONE=Kolkata-GITLAB_HTTPS=false-SSL_SELF_SIGNED=false-GITLAB_HOST=localhost-GITLAB_PORT=10080-GITLAB_SSH_PORT=10022-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=-GITLAB_ROOT_EMAIL=-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-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= "OurSAMLProvider"-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_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=

4: create a docker service using docker-compose:

# docker-compose up-d

Creating root_postgresql_1

Creating root_redis_1

Creating root_gitlab_1

5: since I mapped port 10080 in the compose file, we can log in using this port. The page will prompt you to change your password, and then log in to the system with the root user and your modified password:

Read here, this article "how to use Docker to build Gitlab code warehouse" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report