Run ldap on docker
docker run --name my-openldap-container --detach osixia/openldap:1.2.2
To test the image
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 gives the response which mentioned in the readme file.
To find what listens on what port in terminal
lsof -nP -i4TCP:389 | grep LISTEN
This command results nothing
Docker ps results as follows
osixia/openldap:1.2.2 "/container/tool/run" 34 minutes ago Up 34 minutes 389/tcp, 636/tcp my-openldap-container
I try to connect from LDAP client (Jxplorer-3.3.1.2) and gives following error
Host: localhost Port:389 with default admin password
javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused (Connection refused)]
As stated in the documentation, you have to map the ports:
docker run -p 389:389 -p 689:689 --name my-openldap-container --detach osixia/openldap:1.2.2
Follows the steps I did
Run ldap on docker docker run --name my-openldap-container --detach osixia/openldap:1.2.2
To test the image 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 gives the response which mentioned in the readme file.
To find what listens on what port in terminal lsof -nP -i4TCP:389 | grep LISTEN This command results nothing
Docker ps results as follows osixia/openldap:1.2.2 "/container/tool/run" 34 minutes ago Up 34 minutes 389/tcp, 636/tcp my-openldap-container
I try to connect from LDAP client (Jxplorer-3.3.1.2) and gives following error Host: localhost Port:389 with default admin password javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused (Connection refused)]