{"id":25437201,"url":"https://github.com/starbops/yadldap","last_synced_at":"2025-05-15T04:11:19.167Z","repository":{"id":35054080,"uuid":"39185842","full_name":"starbops/yadldap","owner":"starbops","description":"Yet Another Docker Image with OpenLDAP Server","archived":false,"fork":false,"pushed_at":"2015-08-12T04:22:01.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T11:13:06.049Z","etag":null,"topics":[],"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/starbops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-16T08:32:49.000Z","updated_at":"2016-01-14T20:21:09.000Z","dependencies_parsed_at":"2022-09-08T09:42:26.197Z","dependency_job_id":null,"html_url":"https://github.com/starbops/yadldap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starbops%2Fyadldap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starbops%2Fyadldap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starbops%2Fyadldap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starbops%2Fyadldap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starbops","download_url":"https://codeload.github.com/starbops/yadldap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270654,"owners_count":22042860,"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":[],"created_at":"2025-02-17T08:32:56.214Z","updated_at":"2025-05-15T04:11:16.201Z","avatar_url":"https://github.com/starbops.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet Another Docker Image with OpenLDAP Server\n\nUsing OpenLDAP server as central authentication workstation environment FTW!\nThe TLS version is also available (by default enabled).\n\n## Usage\n\nTo ssh into the box, one must put the public key using the name of `key.pub`\nright under project root directory:\n\n```\n$ cd ${HOME}/yadldap\n$ tree\n.\n├── assets\n│   ├── conf\n│   │   └── ldapscripts.conf\n│   ├── ldif\n│   │   └── tls.ldif\n│   ├── templates\n│   │   └── ldapscripts.adduser.template\n│   └── tls\n│       ├── ca.info\n│       ├── ldap.info\n│       └── README.md\n├── Dockerfile\n├── install\n├── key.pub\n├── LICENSE\n├── README.md\n└── scripts\n    ├── kickstart.sh\n    └── slapd.sh\n```\n\nBuild the Docker image:\n\n```\n$ docker build -t \u003cimage\u003e .\n```\n\nGive it a shot!\n\n```\n$ docker run --rm -it -h \u003chostname\u003e \u003cimage\u003e:\u003cversion\u003e /sbin/my_init -- bash -l\n```\n\nAlso we support three kinds of environment variables now.\n\n1. `LDAP_ADMIN_PASSWORD`\n2. `LDAP_DOMAIN`\n3. `LDAP_ORGANIZATION`\n\nThe following is an example:\n\n```\n$ docker run -d -h \u003chostname\u003e --name ldap \\\n    -e LDAP_ADMIN_PASSWORD=\u003cpassword\u003e \\\n    -e LDAP_DOMAIN=\u003cdomain\u003e \\\n    -e LDAP_ORGANIZATION=\u003corganization\u003e \\\n    \u003cimage\u003e:\u003cversion\u003e /sbin/my_init\n```\n\nTo query the OpenLDAP server, please use `ldapsearch`:\n\n```\n$ ldapsearch -x -H ldaps://\u003ccontain_ip\u003e -b \"dc=example,dc=com\" -D \"cn=admin,dc=example,dc=com\" -w \u003cpassword\u003e\n```\n\n## Persistent Database\n\nAlthough the information in the directory will remain while restarting of the\ncontainer, it will be lost one the container is deleted. To maintain the\ndatabase and config directory persistently, one should use Docker volume. There\nare 4 location that store different information:\n\n1. `/var/lib/ldap`: database\n2. `/etc/ldap/slapd.d`: config\n3. `/build/assets/private`: private keys\n4. `/build/assets/certs`: certificates\n\n```\n$ docker run -d -h \u003chostname\u003e --name ldap \\\n    -e LDAP_ADMIN_PASSWORD=\u003cpasswd\u003e \\\n    -e LDAP_DOMAIN=\u003cdomain\u003e \\\n    -e LDAP_ORGANIZATION=\u003corganization\u003e \\\n    -v /docker/ldap/database:/var/lib/ldap \\\n    -v /docker/ldap/config:/etc/ldap/slapd.d \\\n    -v /docker/ldap/private:/build/assets/private \\\n    -v /docker/ldap/certs:/build/assets/certs \\\n    -p 636:636\n    starbops/yadldap:0.1 /sbin/my_init\n```\n\nIt's highly recommended use `-v /etc/localtime:/etc/localtime:ro` to sync the\ntime in container with host.\n\n## Caveat\n\nThe hostname of the docker container must be set in order to auto-generate the\nprivate keys and certificates.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarbops%2Fyadldap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarbops%2Fyadldap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarbops%2Fyadldap/lists"}