Add README.md
This commit is contained in:
		
							parent
							
								
									143a94f2f4
								
							
						
					
					
						commit
						336a514ece
					
				
							
								
								
									
										68
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,68 @@ | ||||
| # openldap_docker | ||||
| 
 | ||||
| ## Overview | ||||
| This project contains a Dockerized OpenLDAP server, designed to be a straightforward and configurable LDAP server solution. It's ideal for development, testing, or small-scale production environments where a lightweight and easy-to-deploy LDAP server is required. | ||||
| 
 | ||||
| ## Features | ||||
| - **Customizable**: Environment variables allow for easy customization of the LDAP root password, organization, and domain. | ||||
| - **Dockerized**: Containerized for easy deployment and isolation. | ||||
| - **SIGTERM Handling**: Graceful shutdown of the LDAP server on receiving termination signals. | ||||
| 
 | ||||
| ## Prerequisites | ||||
| - Docker installed on your machine. | ||||
| 
 | ||||
| ## Installation | ||||
| 1. **Clone the Repository**: | ||||
|    ```sh | ||||
|    git clone https://git.behzadan.ir/p/openldap_docker.git | ||||
|    cd openldap_docker | ||||
|    ``` | ||||
| 
 | ||||
| 2. **Build the Docker Image**: | ||||
|    ```sh | ||||
|    docker build -t rbehzadan/openldap:latest . | ||||
|    ``` | ||||
| 
 | ||||
| ## Configuration | ||||
| The LDAP server can be configured using the following environment variables: | ||||
| - `LDAP_ROOTPASS`: LDAP admin password (default: "123"). | ||||
| - `LDAP_ORGANISATION`: Name of the organization (default: "example"). | ||||
| - `LDAP_DOMAIN`: LDAP domain (default: "example.com"). | ||||
| 
 | ||||
| ## Usage | ||||
| Run the OpenLDAP Docker container with the desired configuration: | ||||
| ```sh | ||||
| docker run --rm -p 389:389 --name openldap \ | ||||
|   -e LDAP_ROOTPASS="yourpassword" \ | ||||
|   -e LDAP_ORGANISATION="YourOrganization" \ | ||||
|   -e LDAP_DOMAIN="yourdomain.com" \ | ||||
|   -v "`pwd`/ldap-data:/var/lib/ldap" \ | ||||
|   -v /etc/timezone:/etc/timezone:ro \ | ||||
|   -v /etc/localtime:/etc/localtime:ro \ | ||||
|   rbehzadan/openldap:latest | ||||
| ``` | ||||
| 
 | ||||
| ### Docker compose | ||||
| ```yaml | ||||
| version: '3.8' | ||||
| 
 | ||||
| services: | ||||
|   openldap: | ||||
|     image: rbehzadan/openldap | ||||
|     container_name: openldap | ||||
|     ports: | ||||
|       - "389:389" # LDAP port | ||||
|       - "636:636" # LDAPS port (if you plan to use LDAP over SSL) | ||||
|     environment: | ||||
|       - LDAP_ROOTPASS=yourpassword # Replace with your desired password | ||||
|       - LDAP_ORGANISATION=YourOrganization # Replace with your organization's name | ||||
|       - LDAP_DOMAIN=yourdomain.com # Replace with your domain | ||||
|     volumes: | ||||
|       - ldap-data:/var/lib/ldap # Persistent storage for LDAP data | ||||
|     restart: unless-stopped | ||||
| 
 | ||||
| volumes: | ||||
|   ldap-data: | ||||
|     driver: local | ||||
| ``` | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user