Docker installations
You can install Docker from here. Choose the appropriate installers for your host machine and follow the instructions mentioned for the host platform. MacOS: You can get the dmg file for Docker here.
Note: If you are using Docker Desktop for Mac / Docker Desktop for Windows , it is recommended to increase the Memory resource to at-least 4GB. Please find the reference for Mac / Windows.
Once you have Docker installed, ensure that you are running the daemon. If you want to tune and configure docker, please find detailed information here
While it is not mandatory that you have working knowledge of docker (although desirable), at the least you should know the following commands and usages
docker ps -a
- shows all containersdocker rm <container id>
- remove a given containerdocker container COMMAND
" - different commands like start/stop/prune for container(s)docker images
- lists all imagesdocker rmi <image id>
- remove a given imagedocker volume COMMAND
- different commands for managing volumes.
A good link: The Ultimate Docker cheatsheet
Docker Compose installations
Note : If you are using Docker Desktop for Mac / Docker Desktop for Windows, then docker-compose comes bundled with docker and you need not follow the below steps. But make sure to disable Experimental Features for docker-compose from your Docker Dashboard preferences. For other operating systems, you can install docker compose from here.
Currently Bahmni has been tested on docker-compose version 1.29.2. If you are using older versions of docker-compose, please upgrade to the latest version. You can check docker compose version by running docker-compose version
Bahmni Docker Setup Process
Briefly, these are the main steps:
Install latest stable versions of Docker & Docker-Compose in your machine (based on your respective OS)
Clone the
bahmni-package
repository.Start
docker-compose
inbahmni-docker
directory.
That’s it. Bahmni should now be running. There are a few simple first time setup steps also to be followed. For exact steps and detailed documentation, please see (README.md) Bahmni Github docker here: https://github.com/Bahmni/bahmni-package/tree/master/bahmni-docker. If you run into issues, feel free to ask questions on Bahmni Slack #community channel.
To see current status of Bahmni dockerization work, and to contribute in this, please see this page: Bahmni Dockerization Status
ALTERNATIVE: Mekom Solutions has also dockerized Bahmni and deployed it in various Production scenarios. If you wish to check that out, see this Github repo: https://github.com/mekomsolutions/bahmni-docker-compose.
Poor to no internet connectivity
Installing Bahmni using docker-compose would require better internet connectivity since the individual Bahmni services/application images (odoo, openmrs, reports, implementer interface etc) needs to be downloaded on the host machine before running the containers. This would be a challenge for facilities where there is poor to no internet connectivity. Please follow below steps as a work-around to perform the installation
Download and create archive backup for all Bahmni application images at the location where you have internet connectivity
$ docker pull bahmni/bahmni-web $ docker save bahmni/bahmni-web > bahmni_web.tar
If you have capacity constrains, you can also gzip the archive and make the backup smaller
docker save bahmni/bahmni-web | gzip > bahmni_web.tar.gz
Note: please check the bahmni docker-compose for the list of services/application images that you would need to download and create archive e.g. bahmni/openmrs, bahmni/implementer-interface etc. Also note that if you prefer a specific version of the image then add a tag e.g. docker pull bahmni/bahmni-web:1.0.0
Once you have the archives, you can easily port these into usb hard drive or pen drive
You can then mount the usb pen drive to your host machine and load docker images from the archive
$ docker load --input bahmni_web.tar
Once all the images are loaded onto the host machine, you can follow the setup steps as described above.