- Document Overview
- SECTION 1. Prerequisites
- SECTION 2. Start using ApacheDS or OpenLDAP Docker Image
- SECTION 1. Docker Commands
- Contains instructions to install ApacheDS or OpenLDAP using Docker.
- Many ways of setting up an LDAP server. Using a docker image is probably the most expedient.
- For more robust choices, start here: Options for using Apache Fortress and LDAP.
Minimum hardware requirements:
- 1 Core
- 1 GB RAM
Minimum software requirements:
- RHEL/Debian machine
- docker engine
-
Pull the docker image (pick one):
a. apacheds
docker pull apachedirectory/apacheds-for-apache-fortress-tests
b. openldap
docker pull apachedirectory/openldap-for-apache-fortress-tests
-
Run the docker container (pick one):
a. apacheds
export CONTAINER_ID=$(docker run -d -P apachedirectory/apacheds-for-apache-fortress-tests) export CONTAINER_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "10389/tcp") 0).HostPort}}' $CONTAINER_ID) echo $CONTAINER_PORT
b. openldap
export CONTAINER_ID=$(docker run -d -P apachedirectory/openldap-for-apache-fortress-tests) export CONTAINER_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "389/tcp") 0).HostPort}}' $CONTAINER_ID) echo $CONTAINER_PORT
- make note of the port, it's needed later
- depending on your docker setup may need to run as root or sudo priv's.
Here are some common commands needed to manage the Docker image.
docker build -t apachedirectory/apacheds-for-apache-fortress-tests -f src/docker/apacheds-for-apache-fortress-tests/Dockerfile .
- trailing dot matters
Or just to be sure don't use cached layers:
docker build --no-cache=true -t apachedirectory/apacheds-for-apache-fortress-tests -f src/docker/apacheds-for-apache-fortress-tests/Dockerfile .
a. apacheds
CONTAINER_ID=$(docker run -d -P apachedirectory/apacheds-for-apache-fortress-tests)
CONTAINER_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "10389/tcp") 0).HostPort}}' $CONTAINER_ID)
echo $CONTAINER_PORT
b. openldap
CONTAINER_ID=$(docker run -d -P apachedirectory/openldap-for-apache-fortress-tests)
CONTAINER_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "389/tcp") 0).HostPort}}' $CONTAINER_ID)
echo $CONTAINER_PORT
docker exec -it $CONTAINER_ID bash
docker restart $CONTAINER_ID
docker stop $CONTAINER_ID
docker rm $CONTAINER_ID