osixia / docker-phpLDAPadmin

phpLDAPadmin container image 🐳🌴
MIT License
844 stars 197 forks source link

Possible to provide simple instructions/setup on how to integrate docker openldap with docker phpLDAPadmin please? #7

Closed hwongcom closed 9 years ago

hwongcom commented 9 years ago

Possible to provide simple instructions/setup on how to integrate docker openldap with docker phpLDAPadmin please?

osixia commented 9 years ago

yes, in the next release :)

hwongcom commented 9 years ago

can you just make a quick one? a real simple one. because i would like to experiment it immediately. it has been weeks since i tried. please?

when is your next release?

hwongcom commented 9 years ago

Can I donate $5 for you to write the manual asap?

osixia commented 9 years ago

I'll give you a quick example today, and for free ;-)

hwongcom commented 9 years ago

thank you so much! anytime u have a donate button i can see, i will be the first to use it. thanks.

osixia commented 9 years ago

Hello, here a quick example how to run an openldap and phpldapadmin :

Start an openldap container and get the container ip: LDAP_CONTAINER_ID=$(sudo docker run -e USE_SSL=false -d osixia/openldap:0.10.2) LDAP_CONTAINER_IP=$(sudo docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CONTAINER_ID)

As you can see i set the option "USE_SSL=false" because in the openldap 0.10.2 image (the latest) TLS verification required a valid certificate, and ssl certificate are not yet set in the phpLDAPadmin 0.5.1 image we are going to use. (Next release will alow use stric tls and certificate check :) ). So for a simple example a just disable TLS, and because the openldap image and the phpLDAPadmin image are running on the same host it's not mandatory.

Then we run phpLDAPadmin : sudo docker run -p 443:443 -e LDAP_HOSTS=$LDAP_CONTAINER_IP -d osixia/phpldapadmin:0.5.1

we link the image port 443 to our host port 443 if the port 443 is already taken on your host you can change it : sudo docker run -p 6443:443 -e LDAP_HOSTS=$LDAP_CONTAINER_IP -d osixia/phpldapadmin:0.5.1

now you can access phpLDAPadmin on : https://localhost or https://localhost:6443 if you change the host port

Don't worry about the security warning it's because we are using self-signed certificates for https

Enter the login DN: cn=admin,dc=example,dc=org

and the password : admin

that's it, if you want to change the default ldap domain and password take a look at the openldap image documentation: https://github.com/osixia/docker-openldap

let me know if you have any problems.

hwongcom commented 9 years ago

gimme three hours while i set up the environment for testing... thanks a lot!

hwongcom commented 9 years ago

ok! after waiting and downloading the whole app, it's working! THANK YOU VERY MUCH! It took me one whole week to login to the system. Appreciate it! +100

hwongcom commented 9 years ago

one last question... for a newbie like myself... how do you learn ldap? is there like a super simple one that i can use to do authentication for my user's login? i mean... the documents i can find online are too informative such that i feel i'm overloaded with unnecessary info. i just need the ldap to perform as a unified user login with password for my users. that's all. where can i find information in relation to just that?

thank you very again.

osixia commented 9 years ago

Sorry i don't have enough time you will have to lean by yourself.

majidpal commented 6 years ago

Hi - I have my own certificates and I want to use for client. I have ldap server and phpadmin container on same server. But i want phpadmin to be accessed on https with custom certificates.