The Docker configuration supplied in The Ark repository allows quick and easy building of the system. This configuration has four containers defined; MySQL, LDAP (Slapd), Tomcat and Maven. The containers are integrated using Docker Compose.

Note: at present, this process has only been tested and verified to work on Ubuntu 14.04LTS. We are working towards ensuring compatibility with other operating systems such as Microsoft Windows and Apple OSX.

Prerequistite software

Microsoft Windows and Apple OSX users should download "Docker for Windows" and "Docker for

Usage

Assuming the source code repository has been checked out using Git and that the Docker platform is running:

  1. cd docker/
  2. docker-compose build
  3. docker-compose up

Extra Commands

Command Usage
docker-compose up -d Starts the containers in daemon mode meaning that no logs are printed to STDOUT.
docker-compose down -v Tears down all containers, and deletes all of the associated storage volumes.
docker exec -it <containername> /bin/bash Starts an interactive bash session within the container named <containername>.

Passwords

The default passwords are contained in docker/env_file and should be modified before the initial docker-compose up command, as the services are configured in the first run of each container. Passwords can be changed by tearing down all containers and deleting their volumes, however this will also delete any data stored in the MySQL and LDAP containers.

Configuration

Inside docker/env_file, the following Environment Variables can be set to configure the software inside each container:

Environment Variable Usage Default Value
MYSQL_ROOT_PASSWORD Changes the MySQL root user password mysql-password
SLAPD_PASSWORD The password for the LDAP database slapd-password
ARK_USERNAME The Ark Superuser's username This email address is being protected from spambots. You need JavaScript enabled to view it.
ARK_SUPERUSER_PASSWORD The Ark Superuser's password Password_1

Explanation

When docker-compose up is called for the first time, all four containers are built and started. The Maven and MySQL containers begin their work, compiling the web application and importing the base database respectively, while the Tomcat and LDAP containers wait for the output of Maven. The LDAP container waits until the ark-user-account Jar has been created, as it is needed to populate the LDAP database with The Ark root account, and the Tomcat service waits until ark.war has been created, before deploying it.

Usage

With "docker-compose build" and "docker-compose up" complete, The Ark will be accessible via http://localhost:8080/ark in your browser. The SLAPD (LDAP) and MySQL (database) services are also available at localhost:389 and localhost:3306 respectively.

Container-specific Quirks

For the maven container, we mount ~/.m2 to /root/.m2 so that all maven repositories are cached and the user's maven settings.xml file applies.