<commit_before># osixia/openldap

![Docker Pulls](https://img.shields.io/docker/pulls/osixia/openldap.svg)
![Docker Stars](https://img.shields.io/docker/stars/osixia/openldap.svg)
![](https://images.microbadger.com/badges/image/osixia/openldap.svg)

Latest release: 1.2.2 - OpenLDAP 2.4.44 -  [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 

**A docker image to run OpenLDAP.**

> OpenLDAP website : [www.openldap.org](http://www.openldap.org/)


- [Contributing](#contributing)
- [Quick Start](#quick-start)
- [Beginner Guide](#beginner-guide)
	- [Create new ldap server](#create-new-ldap-server)
		- [Data persistence](#data-persistence)
		- [Edit your server configuration](#)
	- [Use an existing ldap database](#use-an-existing-ldap-database)
	- [Backup](#backup)
	- [Administrate your ldap server](#administrate-your-ldap-server)
	- [TLS](#tls)
		- [Use auto-generated certificate](#use-auto-generated-certificate)
		- [Use your own certificate](#use-your-own-certificate)
		- [Disable TLS](#disable-tls)
	- [Multi master replication](#multi-master-replication)
	- [Fix docker mounted file problems](#fix-docker-mounted-file-problems)
	- [Debug](#debug)
- [Environment Variables](#environment-variables)
	- [Default.yaml](#defaultyaml)
	- [Default.startup.yaml](#defaultyamlstartup)
	- [Set your own environment variables](#set-your-own-environment-variables)
		- [Use command line argument](#use-command-line-argument)
		- [Link environment file](#link-environment-file)
		- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
- [Advanced User Guide](#advanced-user-guide)
	- [Extend osixia/openldap:1.2.2 image](#extend-osixiaopenldap122-image)
	- [Make your own openldap image](#make-your-own-openldap-image)
	- [Tests](#tests)
	- [Kubernetes](#kubernetes)
	- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)
- [Security](#security)
	- [Known security issues](#known-security-issues)
- [Changelog](#changelog)

## Contributing

If you find this image useful here's how you can help:

- Send a pull request with your kickass new features and bug fixes
- Help new users with [issues](https://github.com/osixia/docker-openldap/issues) they may encounter
- Support the development of this image and star this repo !

## Quick Start
Run OpenLDAP docker image:

	docker run --name my-openldap-container --detach osixia/openldap:1.2.2

Do not forget to add the port mapping for both port 389 and 689 if you wish to access the ldap server from another machine.

	docker run -p 389:389 -p 689:689 --name my-openldap-container --detach osixia/openldap:1.2.2

Either command starts a new container with OpenLDAP running inside. Let's make the first search in our LDAP container:

	docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin

This should output:

	# extended LDIF
	#
	# LDAPv3
	# base <dc=example,dc=org> with scope subtree
	# filter: (objectclass=*)
	# requesting: ALL
	#

	[...]

	# numResponses: 3
	# numEntries: 2

If you have the following error, OpenLDAP is not started yet, maybe you are too fast or maybe your computer is to slow, as you want... but wait some time before retrying.

		ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)<commit_msg>fix ldaps port numbers<commit_after># osixia/openldap

![Docker Pulls](https://img.shields.io/docker/pulls/osixia/openldap.svg)
![Docker Stars](https://img.shields.io/docker/stars/osixia/openldap.svg)
![](https://images.microbadger.com/badges/image/osixia/openldap.svg)

Latest release: 1.2.2 - OpenLDAP 2.4.44 -  [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 

**A docker image to run OpenLDAP.**

> OpenLDAP website : [www.openldap.org](http://www.openldap.org/)


- [Contributing](#contributing)
- [Quick Start](#quick-start)
- [Beginner Guide](#beginner-guide)
	- [Create new ldap server](#create-new-ldap-server)
		- [Data persistence](#data-persistence)
		- [Edit your server configuration](#)
	- [Use an existing ldap database](#use-an-existing-ldap-database)
	- [Backup](#backup)
	- [Administrate your ldap server](#administrate-your-ldap-server)
	- [TLS](#tls)
		- [Use auto-generated certificate](#use-auto-generated-certificate)
		- [Use your own certificate](#use-your-own-certificate)
		- [Disable TLS](#disable-tls)
	- [Multi master replication](#multi-master-replication)
	- [Fix docker mounted file problems](#fix-docker-mounted-file-problems)
	- [Debug](#debug)
- [Environment Variables](#environment-variables)
	- [Default.yaml](#defaultyaml)
	- [Default.startup.yaml](#defaultyamlstartup)
	- [Set your own environment variables](#set-your-own-environment-variables)
		- [Use command line argument](#use-command-line-argument)
		- [Link environment file](#link-environment-file)
		- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
- [Advanced User Guide](#advanced-user-guide)
	- [Extend osixia/openldap:1.2.2 image](#extend-osixiaopenldap122-image)
	- [Make your own openldap image](#make-your-own-openldap-image)
	- [Tests](#tests)
	- [Kubernetes](#kubernetes)
	- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)
- [Security](#security)
	- [Known security issues](#known-security-issues)
- [Changelog](#changelog)

## Contributing

If you find this image useful here's how you can help:

- Send a pull request with your kickass new features and bug fixes
- Help new users with [issues](https://github.com/osixia/docker-openldap/issues) they may encounter
- Support the development of this image and star this repo !

## Quick Start
Run OpenLDAP docker image:

	docker run --name my-openldap-container --detach osixia/openldap:1.2.2

Do not forget to add the port mapping for both port 389 and 636 if you wish to access the ldap server from another machine.

	docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.2.2

Either command starts a new container with OpenLDAP running inside. Let's make the first search in our LDAP container:

	docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin

This should output:

	# extended LDIF
	#
	# LDAPv3
	# base <dc=example,dc=org> with scope subtree
	# filter: (objectclass=*)
	# requesting: ALL
	#

	[...]

	# numResponses: 3
	# numEntries: 2

If you have the following error, OpenLDAP is not started yet, maybe you are too fast or maybe your computer is to slow, as you want... but wait some time before retrying.

		ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
{'fraction_non_alphanumeric': 0.13976407346573091, 'fraction_numerical': 0.01224428848738241, 'mean_word_length': 4.445528455284553, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, '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': '390114', 'n_tokens_mistral': 2428, 'n_tokens_neox': 2213, 'n_words': 586}