docker gitlab安装

mkdir -p /data/docker/volumes/gitlab
chmod 777 /data/docker/volumes/gitlab
cd /data/docker/volumes/gitlab
mkdir config
mkdir logs
mkdir data


sudo docker run --detach \
    --hostname gitlab.example.com \
    --publish 4443:443 --publish 8880:80 --publish 4422:22 \
    --name gitlab \
    --restart always \
    --volume /data/docker/volumes/gitlab/config:/etc/gitlab \
    --volume /data/docker/volumes/gitlab/logs:/var/log/gitlab \
    --volume /data/docker/volumes/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:latest

安装成功后,第一次设置密码后用root 密码登录

配置邮箱

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 994
gitlab_rails['smtp_user_name'] = "yourname@163.com"
gitlab_rails['smtp_password'] = "your password"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = 'yourname@163.com'
gitlab_rails['smtp_domain'] = "mail.163.com"

docker container restart gitlab

https://blog.csdn.net/wo18237095579/article/details/81082349

posted @ 2018-09-28 11:00  antball  阅读(163)  评论(0编辑  收藏  举报