docker run --detach \
--hostname 168.168.3.210 \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /home/gitlab/config:/etc/gitlab \
--volume /home/gitlab/logs:/var/log/gitlab \
--volume /home/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
mkdir -p /home/dodoao/jenkins
chown 777 /home/dodoao/jenkins
docker run -d -p 8080:8080 -p 50000:50000 -v /home/jenkins:/var/jenkins_home jenkins/jenkins
#LDAP 设置
vim /etc/gitlab/gitlab.rb
gitlab_rails['ldap_enabled'] = true
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: '168.168.0.1'
port: 389
uid: 'sAMAccountName'
bind_dn: 'CN=Administrator,CN=Users,DC=listener,DC=com,DC=cn'
password: '@ltadmin'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
verify_certificates: true
smartcard_auth: false
active_directory: true
allow_username_or_email_login: true
lowercase_usernames: true
block_auto_created_users: false
base: 'CN=Users,DC=listener,DC=com,DC=cn'
user_filter: ''
#修改完之后 :gitlab-ctl reconfigure
Docker GitLab + jenkins + LDAP
于 2021-12-13 11:47:39 首次发布
本文档详细介绍了如何使用Docker部署GitLab,并配置LDAP进行用户身份验证。首先,通过一系列命令行参数启动GitLab容器,包括设置主机名、端口映射、数据卷挂载等。接着,通过编辑`gitlab.rb`文件启用并配置了LDAP服务器,包括主机、端口、认证信息、用户过滤等。最后,通过`gitlab-ctl reconfigure`命令应用更改。
摘要由CSDN通过智能技术生成