Skip to main content

DHIS2 in Docker

Prerequisites

Make sure you have the following tools installed

Overview

Run DHIS2 in Docker with d2 cluster CLI

Running DHIS2 with the d2 cluster CLI is very simple:

d2 cluster up 2.40.0.1 --db-version 2.40 --seed

This way of running DHIS2 provides extra features like running multiple DHIS2 "clusters" at once, saving different configuration combinations and more.

info

See the DHIS2 CLI docs for more examples and details.

Run DHIS2 in Docker with Docker Compose

Running DHIS2 with Docker Compose is also straightforward:

DHIS2_IMAGE=dhis2/core:2.40.0.1 DHIS2_DB_DUMP_URL=https://databases.dhis2.org/sierra-leone/2.39.1/dhis2-db-sierra-leone.sql.gz docker compose up

This is the preferred way if you want a simple setup that consist of DHIS2 and a database.

info

See the dhis2/dhis2-core README for more examples and details.

DHIS2 in Docker in production

We cannot recommend the DHIS2 Docker images for use in production. At this point we don’t have enough experience and therefore can’t vouch for their stability for “mission critical” production use. We are not saying that someone experienced with running Docker in production shouldn’t use them.
In other words, anyone deciding to use DHIS2 in Docker should be aware that they are doing so at their own risk. If you decide to go for it, make sure you perform enough security, performance and stress testing.