docker pull gitlab/gitlab-ce
GITLAB_HOME=`pwd`/data/gitlab
docker run -d \
--hostname gitlab \
--publish 8443:443 --publish 80:80 --publish 2222: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
docker exec -t -i gitlab vim /etc/gitlab/gitlab.rb
下面以网易163邮箱为例配置邮箱:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 25
gitlab_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'] = false
gitlab_rails['smtp_openssl_verify_mode'] = "peer"
gitlab_rails['gitlab_email_from'] = "xxxx@163.com"
user["git_user_email"] = "xxxx@163.com"
注意以上的xxxx@163.com
代表用户名,即邮箱地址,而xxxxpassword
不是邮箱的登陆密码而是网易邮箱的客户端授权密码, 再网易邮箱web页面的设置-POP3/SMTP/IMAP-客户端授权密码
查看。
这个必须配置,否则默认以容器的主机名作为URL,刚开始由于做了端口映射80->8080
, 因此设置为
external_url "http://10.103.240.36:8080"
后来发现external_url
只能配置ip或者域名,不能有端口,否则不能启动。 于是只能把端口设置为80->80
,然后external_url
设置为:
external_url "http://10.103.240.36"
docker restart gitlab
2021年11月17日 15:09
The Navodaya Entrance Exam Result 2022 or JNVST Result 2022 for Jawahar Navodaya Vidyalayas will be published on the Navodaya Vidyalaya Samiti website. JNV Result 2022 Students who took the 6th Class entrance exam can verify their details and download their results through the Navodaya class 6 admission official web portal.
2023年1月23日 19:58
Deploying Gitlab using Docker is a great way to quickly and efficiently set up your source control system. With a few simple steps, you can have your Gitlab instance up buy cheap diamond rings and running in no time. First, pull the Gitlab image using Docker's 'docker pull gitlab/gitlab-ce' command. Then, run the Gitlab instance using Docker. With this easy process, you'll have your source control up and running in no time.