<commit_before># osixia/phpldapadmin

[![](https://badge.imagelayers.io/osixia/phpldapadmin:latest.svg)](https://imagelayers.io/?images=osixia/phpldapadmin:latest 'Get your own badge on imagelayers.io')

A docker image to run phpLDAPadmin.
> [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net)

## Quick start

Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap host or IP :

    sudo docker run -p 443:443 \
               -e PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \
               -d osixia/phpldapadmin

That's it :) you can access phpLDAPadmin on **https://localhost**


## Examples

### OpenLDAP & phpLDAPadmin in 1'

Example script:

    #!/bin/bash -e

    # Run a ldap server, save the container id in LDAP_CID and get its IP:
    LDAP_CID=$(docker run -h ldap.example.org -d osixia/openldap:1.0.0)
    LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)

    # Run phpLDAPadmin and set ldap host to ldap ip
    PHPLDAP_CID=$(docker run -h phpldapadmin.example.org -e PHPLDAPADMIN_LDAP_HOSTS=$LDAP_IP -d osixia/phpldapadmin:0.6.0)

    # We get phpLDAPadmin container ip
    PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $PHPLDAP_CID)

    echo "Go to: https://$PHPLDAP_IP"
    echo "Login DN: cn=admin,dc=example,dc=org"
    echo "Password: <PASSWORD>"

### HTTPS

#### Use autogenerated certificate
By default HTTPS is enable, a certificate is created with the container hostname (set by -h option eg: phpldapadmin.my-compagny.com).

	docker run -h phpldapadmin.my-compagny.com -d osixia/phpldapadmin

#### Use your own certificate

Add your custom certificate, private key and CA certificate in the directory **image/service/phpldapadmin/assets/apache2/certs** adjust filename in **image/env.yaml** and rebuild the image ([see manual build](#manual-build)).

Or you can set your custom certificate at run time, by mouting your a directory containing thoses files to **/container/service/phpldapadmin/assets/apache2/certs** and adjust there name with the following environment variables :

	docker run -v /path/to/certifates:/container/service/phpldapadmin/assets/apache2/certs \
	-e PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-phpldapadmin.crt \
	-e PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-phpldapadmin.key \
	-e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \
	-d osixia/phpldapadmin

Ommit the -e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME variable for self signed certificates

#### Disable HTTPS
Add -e PHPLDAPADMIN_HTTPS=false to the run command :<commit_msg>version<commit_after># osixia/phpldapadmin

[![](https://badge.imagelayers.io/osixia/phpldapadmin:latest.svg)](https://imagelayers.io/?images=osixia/phpldapadmin:latest 'Get your own badge on imagelayers.io')

A docker image to run phpLDAPadmin.
> [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net)

## Quick start

Run a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap host or IP :

    sudo docker run -p 443:443 \
               -e PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \
               -d osixia/phpldapadmin

That's it :) you can access phpLDAPadmin on **https://localhost**


## Examples

### OpenLDAP & phpLDAPadmin in 1'

Example script:

    #!/bin/bash -e

    # Run a ldap server, save the container id in LDAP_CID and get its IP:
    LDAP_CID=$(docker run -h ldap.example.org -d osixia/openldap:1.0.1)
    LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)

    # Run phpLDAPadmin and set ldap host to ldap ip
    PHPLDAP_CID=$(docker run -h phpldapadmin.example.org -e PHPLDAPADMIN_LDAP_HOSTS=$LDAP_IP -d osixia/phpldapadmin:0.6.1)

    # We get phpLDAPadmin container ip
    PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $PHPLDAP_CID)

    echo "Go to: https://$PHPLDAP_IP"
    echo "Login DN: cn=admin,dc=example,dc=org"
    echo "Password: <PASSWORD>"

### HTTPS

#### Use autogenerated certificate
By default HTTPS is enable, a certificate is created with the container hostname (set by -h option eg: phpldapadmin.my-compagny.com).

	docker run -h phpldapadmin.my-compagny.com -d osixia/phpldapadmin

#### Use your own certificate

Add your custom certificate, private key and CA certificate in the directory **image/service/phpldapadmin/assets/apache2/certs** adjust filename in **image/env.yaml** and rebuild the image ([see manual build](#manual-build)).

Or you can set your custom certificate at run time, by mouting your a directory containing thoses files to **/container/service/phpldapadmin/assets/apache2/certs** and adjust there name with the following environment variables :

	docker run -v /path/to/certifates:/container/service/phpldapadmin/assets/apache2/certs \
	-e PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-phpldapadmin.crt \
	-e PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-phpldapadmin.key \
	-e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \
	-d osixia/phpldapadmin

Ommit the -e PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME variable for self signed certificates

#### Disable HTTPS
Add -e PHPLDAPADMIN_HTTPS=false to the run command :
{'fraction_non_alphanumeric': 0.10559495665878645, 'fraction_numerical': 0.006304176516942475, 'mean_word_length': 4.261139896373057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6211739', 'n_tokens_mistral': 1849, 'n_tokens_neox': 1752, 'n_words': 474}