{"id":13821634,"url":"https://github.com/osixia/docker-phpLDAPadmin","last_synced_at":"2025-05-16T12:33:58.117Z","repository":{"id":16449298,"uuid":"19201115","full_name":"osixia/docker-phpLDAPadmin","owner":"osixia","description":"phpLDAPadmin container image 🐳🌴","archived":false,"fork":false,"pushed_at":"2024-08-01T17:35:14.000Z","size":186,"stargazers_count":879,"open_issues_count":63,"forks_count":196,"subscribers_count":25,"default_branch":"stable","last_synced_at":"2025-05-16T07:05:54.437Z","etag":null,"topics":["docker","docker-image","ldap","phpldapadmin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osixia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-27T10:06:08.000Z","updated_at":"2025-05-15T08:21:55.000Z","dependencies_parsed_at":"2024-09-19T01:04:29.217Z","dependency_job_id":null,"html_url":"https://github.com/osixia/docker-phpLDAPadmin","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpLDAPadmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpLDAPadmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpLDAPadmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpLDAPadmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osixia","download_url":"https://codeload.github.com/osixia/docker-phpLDAPadmin/tar.gz/refs/heads/stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254530942,"owners_count":22086696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","ldap","phpldapadmin"],"created_at":"2024-08-04T08:01:25.086Z","updated_at":"2025-05-16T12:33:58.094Z","avatar_url":"https://github.com/osixia.png","language":"Shell","readme":"# osixia/phpldapadmin\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/osixia/phpldapadmin.svg)][hub]\n[![Docker Stars](https://img.shields.io/docker/stars/osixia/phpldapadmin.svg)][hub]\n\n[hub]: https://hub.docker.com/r/osixia/phpldapadmin/\n\nLatest release: 0.9.0 - phpLDAPadmin 1.2.5 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpldapadmin/) \n\n**A docker image to run phpLDAPadmin.**\n\u003e [phpldapadmin.sourceforge.net](http://phpldapadmin.sourceforge.net)\n\n- [osixia/phpldapadmin](#osixiaphpldapadmin)\n  - [Quick start](#quick-start)\n    - [OpenLDAP \u0026 phpLDAPadmin in 1'](#openldap--phpldapadmin-in-1)\n  - [Beginner Guide](#beginner-guide)\n    - [Use your own phpLDAPadmin config](#use-your-own-phpldapadmin-config)\n    - [HTTPS](#https)\n      - [Use autogenerated certificate](#use-autogenerated-certificate)\n      - [Use your own certificate](#use-your-own-certificate)\n      - [Disable HTTPS](#disable-https)\n    - [Fix docker mounted file problems](#fix-docker-mounted-file-problems)\n    - [Debug](#debug)\n  - [Environment Variables](#environment-variables)\n    - [Set your own environment variables](#set-your-own-environment-variables)\n      - [Use command line argument](#use-command-line-argument)\n      - [Link environment file](#link-environment-file)\n      - [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)\n  - [Advanced User Guide](#advanced-user-guide)\n    - [Extend osixia/phpldapadmin:0.9.0 image](#extend-osixiaphpldapadmin090-image)\n    - [Make your own phpLDAPadmin image](#make-your-own-phpldapadmin-image)\n    - [Tests](#tests)\n    - [Kubernetes](#kubernetes)\n    - [Under the hood: osixia/web-baseimage](#under-the-hood-osixiaweb-baseimage)\n  - [Security](#security)\n  - [Changelog](#changelog)\n\n## Quick start\n\nRun a phpLDAPadmin docker image by replacing `ldap.example.com` with your ldap host or IP :\n\n    docker run -p 6443:443 \\\n            --env PHPLDAPADMIN_LDAP_HOSTS=ldap.example.com \\\n            --detach osixia/phpldapadmin:0.9.0\n\nThat's it :) you can access phpLDAPadmin on [https://localhost:6443](https://localhost:6443)\n\n### OpenLDAP \u0026 phpLDAPadmin in 1'\n\nExample script:\n\n    #!/bin/bash -e\n    docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.1.8\n    docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.9.0\n\n    PHPLDAP_IP=$(docker inspect -f \"{{ .NetworkSettings.IPAddress }}\" phpldapadmin-service)\n\n    echo \"Go to: https://$PHPLDAP_IP\"\n    echo \"Login DN: cn=admin,dc=example,dc=org\"\n    echo \"Password: admin\"\n\n\n## Beginner Guide\n\n### Use your own phpLDAPadmin config\nThis image comes with a phpLDAPadmin config.php file that can be easily customized via environment variables for a quick bootstrap,\nbut setting your own config.php is possible. 2 options:\n\n- Link your config file at run time to `/container/service/phpldapadmin/assets/config/config.php` :\n\n            docker run --volume /data/my-config.php:/container/service/phpldapadmin/assets/config/config.php --detach osixia/phpldapadmin:0.9.0\n\n- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)\n\n### HTTPS\n\n#### Use autogenerated certificate\nBy default HTTPS is enable, a certificate is created with the container hostname (it can be set by docker run --hostname option eg: phpldapadmin.my-company.com).\n\n\tdocker run --hostname phpldapadmin.my-company.com --detach osixia/phpldapadmin:0.9.0\n\n#### Use your own certificate\n\nYou can set your custom certificate at run time, by mounting a directory containing those files to **/container/service/phpldapadmin/assets/apache2/certs** and adjust their name with the following environment variables:\n\n\tdocker run --volume /path/to/certifates:/container/service/phpldapadmin/assets/apache2/certs \\\n\t--env PHPLDAPADMIN_HTTPS_CRT_FILENAME=my-cert.crt \\\n\t--env PHPLDAPADMIN_HTTPS_KEY_FILENAME=my-cert.key \\\n\t--env PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \\\n\t--detach osixia/phpldapadmin:0.9.0\n\nOther solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)\n\n#### Disable HTTPS\nAdd --env PHPLDAPADMIN_HTTPS=false to the run command :\n\n    docker run --env PHPLDAPADMIN_HTTPS=false --detach osixia/phpldapadmin:0.9.0\n\n### Fix docker mounted file problems\n\nYou may have some problems with mounted files on some systems. The startup script try to make some file adjustment and fix files owner and permissions, this can result in multiple errors. See [Docker documentation](https://docs.docker.com/v1.4/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume).\n\nTo fix that run the container with `--copy-service` argument :\n\n\t\tdocker run [your options] osixia/phpldapadmin:0.9.0 --copy-service\n\n### Debug\n\nThe container default log level is **info**.\nAvailable levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.\n\nExample command to run the container in `debug` mode:\n\n\tdocker run --detach osixia/phpldapadmin:0.9.0 --loglevel debug\n\nSee all command line options:\n\n\tdocker run osixia/phpldapadmin:0.9.0 --help\n\n## Environment Variables\n\nEnvironment variables defaults are set in **image/environment/default.yaml**\n\nSee how to [set your own environment variables](#set-your-own-environment-variables)\n\n- **PHPLDAPADMIN_LDAP_HOSTS**: Set phpLDAPadmin server config. Defaults to :\n\n  ```yaml\n  - ldap.example.org:\n    - server:\n      - tls: true\n    - login:\n      - bind_id: cn=admin,dc=example,dc=org\n  - ldap2.example.org\n  - ldap3.example.org\n  ```\n  This will be converted in the phpldapadmin config.php file to :\n  ```php7\n  $servers-\u003enewServer('ldap_pla');\n  $servers-\u003esetValue('server','name','ldap.example.org');\n  $servers-\u003esetValue('server','host','ldap.example.org');\n  $servers-\u003esetValue('server','tls',true);\n  $servers-\u003esetValue('login','bind_id','cn=admin,dc=example,dc=org');\n  $servers-\u003enewServer('ldap_pla');\n  $servers-\u003esetValue('server','name','ldap2.example.org');\n  $servers-\u003esetValue('server','host','ldap2.example.org');\n  $servers-\u003enewServer('ldap_pla');\n  $servers-\u003esetValue('server','name','ldap3.example.org');\n  $servers-\u003esetValue('server','host','ldap3.example.org');\n  ```\n  All server configuration are available, just add the needed entries, for example:  \n  ```yaml\n  - ldap.example.org:\n    - server:\n      - tls: true\n      - port: 636\n      - force_may: array('uidNumber','gidNumber','sambaSID')\n    - login:\n      - bind_id: cn=admin,dc=example,dc=org\n      - bind_pass: p0p!\n    - auto_number:\n      - min: 1000\n  - ldap2.example.org\n  - ldap3.example.org\n  ```\n\n  See complete list: http://phpldapadmin.sourceforge.net/wiki/index.php/LDAP_server_definitions\n\n  If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:\n\n\t\tdocker run --env PHPLDAPADMIN_LDAP_HOSTS=\"#PYTHON2BASH:[{'ldap.example.org': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=org'}]}]}, 'ldap2.example.org', 'ldap3.example.org']\" --detach osixia/phpldapadmin:0.9.0\n\n  To convert yaml to python online: http://yaml-online-parser.appspot.com/\n\n  If you would like to skip the display name == hostname element of the above use the **PHPLDAPADMIN_LDAP_HOSTS_FRIENDLY** environmental variable. This then uses the top most name as the display name of the server. You will then need to add host to the yaml within the server section. Note this is a global setting, if you do it for one server, you must do it for all. eg\n  ```yaml\n  - Primary:\n    - server:\n      - host: ldap-master.example.org\n  - Backup:\n    - server:\n      - host: 192.168.0.100\n  ```\n\nApache :\n- **PHPLDAPADMIN_SERVER_ADMIN**: Server admin email. Defaults to `webmaster@example.org`\n- **PHPLDAPADMIN_SERVER_PATH**: Server path (usefull if behind a reverse proxy). Defaults to `/phpldapadmin`\n\nHTTPS :\n- **PHPLDAPADMIN_HTTPS**: Use apache ssl config. Defaults to `true`\n- **PHPLDAPADMIN_HTTPS_CRT_FILENAME**: Apache ssl certificate filename. Defaults to `phpldapadmin.crt`\n- **PHPLDAPADMIN_HTTPS_KEY_FILENAME**: Apache ssl certificate private key filename. Defaults to `phpldapadmin.key`\n- **PHPLDAPADMIN_HTTPS_CA_CRT_FILENAME**: Apache ssl CA certificate filename. Defaults to `ca.crt`\n\nReverse proxy HTTPS :\n- **PHPLDAPADMIN_TRUST_PROXY_SSL**: Set to `true` to trust X-Forwarded-Proto header\n\nLdap client TLS/LDAPS :\n\n- **PHPLDAPADMIN_LDAP_CLIENT_TLS**: Enable ldap client tls config, ldap server certificate check and set client  certificate. Defaults to `true`\n- **PHPLDAPADMIN_LDAP_CLIENT_TLS_REQCERT**: Set ldap.conf TLS_REQCERT. Defaults to `demand`\n- **PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME**: Set ldap.conf TLS_CACERT to /container/service/ldap-client/assets/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME. Defaults to `ldap-ca.crt`\n- **PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME**: Set .ldaprc TLS_CERT to /container/service/ldap-client/assets/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_CRT_FILENAME. Defaults to `ldap-client.crt`\n- **PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME**: Set .ldaprc TLS_KEY to /container/service/ldap-client/assets/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_KEY_FILENAME. Defaults to `ldap-client.key`\n\n\tMore information at : http://www.openldap.org/doc/admin24/tls.html (16.2.2. Client Configuration)\n\nOther environment variables:\n- **PHPLDAPADMIN_SSL_HELPER_PREFIX**: ssl-helper environment variables prefix. Defaults to `phpldapadmin`, ssl-helper first search config from PHPLDAPADMIN_SSL_HELPER_* variables, before SSL_HELPER_* variables.\n- **LDAP_CLIENT_SSL_HELPER_PREFIX**: ssl-helper environment variables prefix. Defaults to `ldap`, ssl-helper first search config from LDAP_SSL_HELPER_* variables, before SSL_HELPER_* variables.\n\n### Set your own environment variables\n\n#### Use command line argument\nEnvironment variables can be set by adding the --env argument in the command line, for example:\n\n\tdocker run --env PHPLDAPADMIN_LDAP_HOSTS=\"ldap.example.org\" \\\n\t--detach osixia/phpldapadmin:0.9.0\n\n#### Link environment file\n\nFor example if your environment file is in :  /data/environment/my-env.yaml\n\n\tdocker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \\\n\t--detach osixia/phpldapadmin:0.9.0\n\nTake care to link your environment file to `/container/environment/XX-somedir` (with XX \u003c 99 so they will be processed before default environment files) and not  directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).\n\n#### Make your own image or extend this image\n\nThis is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.\n\n## Advanced User Guide\n\n### Extend osixia/phpldapadmin:0.9.0 image\n\nIf you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.\n\nDockerfile example:\n\n    FROM osixia/phpldapadmin:0.9.0\n    MAINTAINER Your Name \u003cyour@name.com\u003e\n\n    ADD https-certs /container/service/phpldapadmin/assets/apache2/certs\n    ADD ldap-certs /container/service/ldap-client/assets/certs\n    ADD my-config.php /container/service/phpldapadmin/assets/config/config.php\n    ADD environment /container/environment/01-custom\n\n\nWarning: if you want to install new packages from debian repositories, this image has a configuration to prevent documentation and locales to be installed. If you need documentation and locales remove the following files :\n**/etc/dpkg/dpkg.cfg.d/01_nodoc** and **/etc/dpkg/dpkg.cfg.d/01_nolocales**\n\n### Make your own phpLDAPadmin image\n\nClone this project :\n\n\tgit clone https://github.com/osixia/docker-phpLDAPadmin\n\tcd docker-phpLDAPadmin\n\nAdapt Makefile, set your image NAME and VERSION, for example :\n\n\tNAME = osixia/phpldapadmin\n\tVERSION = 0.9.0\n\n\tbecomes :\n\tNAME = billy-the-king/phpldapadmin\n\tVERSION = 0.1.0\n\nAdd your custom certificate, environment files, config.php ...\n\nBuild your image :\n\n\tmake build\n\nRun your image :\n\n\tdocker run -d billy-the-king/phpldapadmin:0.1.0\n\n### Tests\n\nWe use **Bats** (Bash Automated Testing System) to test this image:\n\n\u003e [https://github.com/sstephenson/bats](https://github.com/sstephenson/bats)\n\nInstall Bats, and in this project directory run :\n\n\tmake test\n\n### Kubernetes\n\nKubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.\n\nMore information:\n- http://kubernetes.io\n- https://github.com/kubernetes/kubernetes\n\nA kubernetes example is available in **example/kubernetes**\n\n### Under the hood: osixia/web-baseimage\n\nThis image is based on osixia/web-baseimage.\nMore info: https://github.com/osixia/docker-web-baseimage\n\n## Security\nIf you discover a security vulnerability within this docker image, please send an email to the Osixia! team at security@osixia.net. For minor vulnerabilities feel free to add an issue here on github.\n\nPlease include as many details as possible.\n\n## Changelog\n\nPlease refer to: [CHANGELOG.md](CHANGELOG.md)\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-phpLDAPadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosixia%2Fdocker-phpLDAPadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-phpLDAPadmin/lists"}