version: '3.8'
services:
ldap:
image: osixia/openldap
container_name: ldap_server
ports:
- "389:389"
volumes:
- ./data:/var/lib/ldap
- ./config:/etc/ldap/slapd.d
environment:
- LDAP_ORGANISATION=myorg
- LDAP_DOMAIN=mydomain.com
- LDAP_ADMIN_PASSWORD=adminpassword
phpldapadmin:
image: osixia/phpldapadmin
container_name: ldap_manager
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap
- PHPLDAPADMIN_HTTPS=false
ports:
- "8082:80"
depends_on:
- ldap
jenkins:
image: jenkins/jenkins:lts
user: root
ports:
- "9092:8080"
volumes:
- ./jenkins-data:/var/jenkins_home
environment:
TZ: "Asia/Shanghai"
depends_on:
- ldap
docker-compose up -d
dn: ou=people,dc=mydomain,dc=com
objectclass: organizationalUnit
objectclass: top
ou: people
dn: cn=jenkins,ou=people,dc=mydomain,dc=com
cn: jenkins
gidnumber: 500
objectclass: posixGroup
objectclass: top
dn: cn=jenkins,ou=people,dc=mydomain,dc=com
cn: jenkins
gidnumber: 500
objectclass: posixGroup
objectclass: top
dn: cn=jenkins,ou=people,dc=mydomain,dc=com
cn: jenkins
gidnumber: 500
objectclass: posixGroup
objectclass: top
dn: cn=zhangsan,cn=jenkins,ou=people,dc=mydomain,dc=com
cn: zhangsan
gidnumber: 500
givenname: zhangsan
homedirectory: /home/users/zhangsan
loginshell: /bin/bash
objectclass: inetOrgPerson
objectclass: posixAccount
objectclass: top
sn: zhangsan
uid: zhangsan
uidnumber: 1002
userpassword: {MD5}y/82A5w9AhKz40wj3N4UVg==