Json2Ldap with Docker
The evaluation version of Json2Ldap is now also available as a Docker image.
1. Docker quick start
If Docker isn't installed on your computer you can find instructions here. The Community Edition (CE) is sufficient to run a Json2Ldap instance.
The provided Docker image includes the required Java runtime and an Apache Tomcat web server with Json2Ldap installed as the sole application in it.
To run the Json2Ldap evaluation version in a Docker container:
Pull the latest image from Docker Hub
Where [version] is the latest available listed in the c2id Docker repository.
docker pull c2id/json2ldap-demo:[version]
Run a container with the Json2Ldap image
Replace host_port with an available port on your host:
docker run -p host_port:8080 --network host c2id/json2ldap-demo:[version]
The Json2Ldap configuration can be overridden with Java system properties passed via the CATALINA_OPTS environment variable into the container:
docker run -p host_port:8080 -e CATALINA_OPTS='-Dprop-name-1=value -Dprop-name-2=value' c2id/c2id-server:[version]
The CATALINA_OPTS environment variable can alternatively be stored in a text file passed via the
Verify that the Json2Ldap service is up by opening its banner page with a web browser:
Check out the quick start guide.
When done the container can be terminated with
Ctrl + C.
2. Docker file
The Docker file used to build the demo image of Json2Ldap:
FROM tomcat:9-jdk11-corretto LABEL maintainer="[email protected]" # Add the Json2Ldap WAR as the root (/) web application ADD json2ldap.war /usr/local/tomcat/webapps/ROOT.war # Direct Json2Ldap logging to STDOUT, add more Java system properties if needed ENV CATALINA_OPTS="$CATALINA_OPTS -Dlog4j.loggers.root.appender=console" # Tomcat binds on port 8080 EXPOSE 8080 # Launch Tomcat CMD ["bash", "/usr/local/tomcat/bin/catalina.sh", "run"]