Home - WorldHealthOrganization/d2-docker GitHub Wiki

ABOUT d2-docker

D2-docker is a wrapper over docker and docker-compose that manages DHIS2 server instances from the command-line. D2-docker is implemented in Python 3 and provides both an executable and a Python module to extend from.

The CLI (command-line interface) resembles that of _docker-compose_​, with a set of custom command needed to interact with DHIS2 instances. A user familiar with the docker infrastructure can still use docker to interact with the base infrastructure (containers, images, volumes, and so on) should they need to.

License: GNU GPL v3

imagen

TECHNICAL REQUIREMENTS

D2-docker has been tested on ​ GNU/Linux​ (specifically, Ubuntu 18.04 and Arch Linux), ​ Windows 10​ and ​ MacOS X (​10.14, Mojave). A typical DHIS2 instance takes around 4-8GB of RAM, so make sure you have that free memory for all the servers you are planning to run simultaneously.

External dependencies:

  • Python >= 3.5 (with setuptools)
  • Docker >= 18
  • Docker compose >= 1.17
  • RAM memory: At least 4Gb for instance, preferably 8Gb.

Ubuntu 18.04

$ sudo apt install docker.io docker-compose python3 python3-setuptools

Windows 10

imagen

NOTE:​ If your computer has more than 2 CPUs, we encourage you to increase the CPUs to 4, making DHIS2 dockers run more softly.

MacOS X

Install Docker Desktop.

imagen

Once installed, go to Docker Notification icon, option Preferences​, tab _File Sharing_​ and add the directory /usr/local/lib:

imagen

Within tab ​Advanced, increase the resources to fit your Dhis2 instance requirements:

imagen

Now, open a shell terminal. You should be an admin user to proceed. First, make sure your user can write in _/usr/local_​, brew needs write-access to the directory:

$ sudo chown -R $(whoami):admin /usr/local

And finally, install _python3_​ using _brew_​:

$ brew install python3

$ brew postinstall python3

Important:​ Once installed, you should run all d2-docker​ commands as root, so either start a root session (i.e. sudo su-), or prefix all d2-docker​ commands with ​sudo​.