Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to quickly deploy Gitlab using Docker

Shulou Source: shulou.com Published: 2022-05-31 13:29:20 09月13日 Update

This article mainly introduces how to use Docker to quickly deploy Gitlab related knowledge, the content is detailed and easy to understand, the operation is simple and fast, with a certain reference value, I believe you will get something after reading this article on how to use Docker to quickly deploy Gitlab, let's take a look at it.

1. Download gitlab image

Docker pull gitlab/gitlab-ce

two。 Run the gitlab instance

Gitlab_home= `pwd` / data/gitlabdocker run-d\-- hostname gitlab\-- publish 8443 publish 80:80-- publish 2222 gitlab_home/logs:/var/log/gitlab 22\-- name gitlab\-- restart always\-- volume $gitlab_home/config:/etc/gitlab\-- volume $gitlab_home/logs:/var/log/gitlab\-- volume $gitlab_home/data:/var/opt/gitlab\ gitlab/gitlab-ce

3. Configure gitlab instance

3.1 configure mailboxes:

Docker exec-t-i gitlab vim / etc/gitlab/gitlab.rb

Take NetEase 163mailbox as an example to configure mailbox:

Gitlab_rails ['smtp_enable'] = truegitlab_rails [' smtp_address'] = "smtp.163.com" gitlab_rails ['smtp_port'] = 25gitlab_rails [' smtp_user_name'] = "xxxx@163.com" gitlab_rails ['smtp_password'] = "xxxxpassword" gitlab_rails [' smtp_domain'] = "163.com" gitlab_rails ['smtp_authentication'] = "login" gitlab_rails [' smtp_enable_starttls_auto'] = falsegitlab _ rails ['smtp_openssl_verify_mode'] = "peer" gitlab_rails [' gitlab_email_from'] = "xxxx@163.com" user ["git_user_email"] = "xxxx@163.com"

Note that the above xxxx@163.com represents the user name, that is, the email address, while xxxxpassword is not the login password of the mailbox but the client authorization password of NetEase mailbox, and then NetEase mailbox web page settings-pop3/smtp/imap- client authorization password view.

3.2 configure external access to url

This must be configured, otherwise the hostname of the container is used as the url by default. At first, because the port mapping is 80-> 8080, it is set to

External_url http://10.103.240.36:8080

Later, it was found that external_url can only be configured with ip or domain name, and cannot have ports, otherwise it cannot be started.

Therefore, the port can only be set to 80-> 80, and then external_url can be set to:

External_url http://10.103.240.36

4. Restart gitlab

This is the end of docker restart gitlab's article on "how to quickly deploy Gitlab using Docker". Thank you for reading! I believe you all have a certain understanding of "how to quickly deploy Gitlab using Docker". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Mailbox configuration password knowledge port NetEase content instance customer client article host representative value masterpiece address domain name container simple operation article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno Docker vpn Shulou Technology