Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

slapd for 中科软

默认值已经配好,直接启动即可,步骤如下:


# 创建数据卷容器
docker run -v /var/lib/ldap -v /etc/ldap/slapd.d/ --name slapd-data-sinsoft guoyukun/slapd-sinosoft echo data_only for sinosoft slapd

# 启动Ldap服务,使用刚刚创建的数据卷容器
docker run --volumes-from slapd-data-sinsoft \
           -p 389:389 \
           --name slapd-sinosoft \
           -d guoyukun/slapd-sinosoft

# 导入目录数据
ldapadd -h localhost -p 1389 -c -x -D cn=admin,dc=sinosoft,dc=com,dc=cn -W -f ~/Desktop/ldap-without-sysprops.ldif

# 启动PhpLdapAdmin管理应用
docker run -p 80 \
           -e NOSSL=1 \
           -e LDAP_HOST=ldap \
           -e LDAP_BASE_DN=dc=sinosoft,dc=com,dc=cn \
           -e LDAP_LOGIN_DN=cn=admin,dc=sinosoft,dc=com,dc=cn \
           --link=slapd-sinosoft:ldap \
           -d faizhasim/phpldapadmin

A basic configuration of the OpenLDAP server, slapd, with support for data
volumes.

This image will initialize a basic configuration of slapd. Most common schemas
are preloaded (all the schemas that come preloaded with the default Ubuntu
Precise install of slapd), but the only record added to the directory will be
the root organisational unit.

You can (and should) configure the following by providing environment variables
to docker run:

  • LDAP_DOMAIN sinosoft.com.cn
  • LDAP_ORGANISATION Sinosoft Co. ,Ltd.
  • LDAP_ROOTPASS cn=admin,dc=sinosoft,dc=com,dc=cn的密码admin

For example, to start a container running slapd for the sinosoft.com.cn domain,
with data stored in /data/ldap on the host, use the following:

docker run -v /data/ldap:/var/lib/ldap \
           -d nickstenning/slapd

You can find out which port the LDAP server is bound to on the host by running
docker ps (or docker port <container_id> 389). You could then load an LDIF
file (to set up your directory) like so:

ldapadd -h localhost -p <host_port> -c -x -D cn=admin,dc=sinosoft,dc=com,dc=cn -W -f data.ldif

NB: Please be aware that by default docker will make the LDAP port
accessible from anywhere if the host firewall is unconfigured.

Docker Pull Command
Owner
guoyukun
Source Repository

Comments (0)