Skip to content

Commit 425d29c

Browse files
committed
docs
1 parent 141d4ca commit 425d29c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,12 @@ That's it :) you can access phpLDAPadmin on [https://localhost:6443](https://loc
5050
Example script:
5151

5252
#!/bin/bash -e
53+
docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.1.1
5354

54-
# Run a ldap server, save the container id in LDAP_CID and get its IP:
55-
LDAP_CID=$(docker run --hostname ldap.example.org --detach osixia/openldap:1.1.1)
56-
LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)
55+
docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.6.8
5756

58-
# Run phpLDAPadmin and set ldap host to ldap container ip
59-
PHPLDAP_CID=$(docker run --hostname phpldapadmin.example.org --env PHPLDAPADMIN_LDAP_HOSTS=$LDAP_IP --detach osixia/phpldapadmin:0.6.8)
57+
PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service)
6058

61-
# We get phpLDAPadmin container ip
62-
PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $PHPLDAP_CID)
63-
64-
echo "Ldap container IP: $LDAP_IP"
65-
echo "phpLDADadmin container IP $PHPLDAP_IP"
66-
echo ""
6759
echo "Go to: https://$PHPLDAP_IP"
6860
echo "Login DN: cn=admin,dc=example,dc=org"
6961
echo "Password: admin"

0 commit comments

Comments
 (0)