docker-compose 安装 LDAP+phpLDAPadmin
1、docker-compose.yml
version: '2'
services:
#ldap服务
openldap:
image: osixia/openldap
container_name: openldap-server
hostname: ldap-server
networks:
- ldap
ports:
- '389:389'
- '636:636'
environment:
- LDAP_ORGANISATION=baidu #组织名称,需要改
- LDAP_DOMAIN=baidu.com #域名,需要改
- LDAP_ADMIN_USERNAME=admin
- LDAP_ADMIN_PASSWORD=123456
#- LDAP_USERS=user01,user02
#- LDAP_PASSWORDS=password1,password2
#页面管理
phpldapadmin:
image: osixia/phpldapadmin
container_name: openldap-admin
hostname: ldap-admin
privileged: true #授予真实root权限
networks:
- ldap
ports:
- '80:80'
- '443:443' #PHPLDAPADMIN_HTTPS为true有效
environment:
- PHPLDAPADMIN_HTTPS=false
- PHPLDAPADMIN_LDAP_HOSTS=ldap-server #指向openldap的hostname
depends_on:
- openldap
networks:
ldap:
driver: bridge
2、验证
- 登录验证
地址:http:ip #映射的80,直接IP即可访问
账号:cn=admin,dc=baidu,dc=com #整体是一个账户名,cn是用户名,这里注意调整为配置的dc
密码:123456 #密码
标签:compose,admin,LDAP,phpLDAPadmin,openldap,ldap,docker
From: https://www.cnblogs.com/yhaiqi/p/17272208.html