The OpenHMIS team is currently in the process of setting up some long-needed integration tests and, as part of that effort, have created some docker images for some of the recent platform and reference application releases. These images can be found at Docker
The README file explains the various tags that are available as well as how to get an instance up and running but I’ll mention the basics here. First, our tags use the following naming convention: <Omrs Platform Version>_<Ref App Version>
. For images without the reference application the second version is left off. For example, tag ‘1.11.5_2.3.1’ will be an image with OpenMRS Platform 1.11.5 with the Reference Application 2.3.1 while tag ‘1.11.3’ is an image with just the OpenMRS Platform 1.11.3.
Our images require a separate MySQL image (or accessible mysql server) to be used. To start up a MySQL docker instance execute the following command (replacing <LOCAL_PATH>
with a path on the host machine where the mysql data will be stored):
docker run --name openmrs-mysql -v
<LOCAL_PATH>
:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=test -d -p=3306:3306 mysql/mysql-server:5.6
With that mysql instance running, you can start an OpenMRS instance:
docker run --name openhmis-test --link openmrs-mysql:mysql -it -p 9999:8080 -e DEMO_DATA=1 -e DB_USER=‘root’ -e DB_PASS=‘test’ openhmis/openmrs-docker:latest
This will download the ‘latest’ tag (currently ‘1.11.5_2.3.1’), load the OpenMRS and OpenHMIS demo data, copy the current OpenHMIS modules, and then start up OpenMRS, making it available on port 9999. Our docker hub page has a complete list of configurable environment variables but let me highlight a couple:
- DB_NAME: The name to use for the OpenMRS database. If not defined this will be set to the default database name for the image selected. If a database with the specified name already exists it will not be updated and the specified OpenMRS user will be given access to it.
- EXCLUDE_OPENHMIS: Tells the script to not download and install the OpenHMIS modules and data. This parameter simply needs to be set to something, the value does not matter.
We would love to get feedback from the community on these images including requests for additional tags, the tag naming convention, and any optimizations that can be done. Lastly, we have two questions:
- We currently manually create the sql file for the demo data (using mysqldump after loading the demo data during the omrs installation process). Do sql scripts of the demo data for each released version exist somewhere so that we can download it instead of manually creating it?
- When creating the openmrs-runtime.properties file we are entering the username and password in plaintext because I am not aware of a program to generate the correct encryption vector, key, and then the associated encrypted username and password from the terminal. Is there a way to easily encrypt this information from the terminal? We’re not too worried about this given that the file is within the docker image and (should) not be generally accessible but we would like to improve this if possible.