CDLUC3 / mrt-doc

Documentation and Information regarding the Merritt repository
8 stars 4 forks source link

Potential docker image to try for containerizing LDAP #462

Closed terrywbrady closed 3 years ago

terrywbrady commented 3 years ago
#!/bin/bash 

# https://github.com/osixia/docker-openldap#create-new-ldap-server

docker run -p 389:389 --name ldap-service --hostname ldap-service --env LDAP_ORGANISATION="ScytaleLabs" --env LDAP_DOMAIN="scytalelabs.com" \
--env LDAP_ADMIN_PASSWORD="adminPassword" --env LDAP_BASE_DN="dc=scytalelabs,dc=com" --volume /tmp/data/slapd/database:/var/lib/ldap \
--volume /tmp/data/slapd/config:/etc/ldap/slapd.d --detach osixia/openldap
docker run -p 443:443 --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-service --detach osixia/phpldapadmin:0.9.0

# PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service)
# echo "Go to: https://$PHPLDAP_IP" 
echo "https://localhost"

# docker stop phpldapadmin-service ldap-service
# docker rm phpldapadmin-service ldap-service
terrywbrady commented 3 years ago

@mreyescdl and @elopatin-uc3 , I found a page online that described how to run an LDAP server in Docker. It comes along with am image for a phpldapadmin service that seems to browse the ldap instance.

This could be a useful addition to our docker stack. When I get some time, I might explore this further.

elopatin-uc3 commented 3 years ago

Closing in lieu of #485