Customising Bahmni-docker Image Tag Os architecture from amd64 to accomodate / support arm64 Architectures

Hello Bahmni folks, I have been trying to setup bahmni-docker on an ARM64 device. But it looks like Bhamni standard and Lite (specifically the bahmni/openmrs-db image component ) is configured to run on amd64 architectures according to tags at https://hub.docker.com/_/alpine/tags this has caused errors like

1 . My question is would I be right to build the right alpine image using this Dockerfile standard-config/package/docker/Dockerfile at master · Bahmni/standard-config · GitHub

then use that build with this compose file bahmni-docker/bahmni-standard/docker-compose.yml at master · Bahmni/bahmni-docker · GitHub

assuming , am creating a custom image for arm64 architectures ?

cc @bennyange @angshuonline @mohant @rahu1ramesh, @gsluthra

In short, is standard-config/package/docker/Dockerfile at master · Bahmni/standard-config · GitHub the right Dockerfile to change the images for bahmni-docker ?

Hey Tendo Kiiza Martyn,

Thank you for reaching out regarding your attempt to set up Bahmni Docker on an ARM64 device. You are correct that some Bahmni components are built for amd64 architectures, which may be causing compatibility issues.

As a quick fix, rather than rebuilding the images, you can specify the platform for the affected services in your docker-compose.yml file. You can achieve this by adding the following line under each service that faces platform incompatibility:

platform: linux/amd64

For example, for the reportsdb service, your configuration should look like this:

reportsdb:
  platform: linux/amd64
  image: ${REPORTS_DB_IMAGE_NAME:?}
  profiles: ["reports", "bahmni-standard"]
  environment:

This approach should allow you to run Bahmni on your ARM64 device without modifying or rebuilding the images.

Please try this solution and let us know if you need further assistance.

1 Like

Thanks alot @rahu1ramesh for the response. will get back to you when done with this.

Hi @rahu1ramesh i get this error after applying the changes which you shared

:heavy_check_mark: openmrsdb Pulled 3.1s [+] Running 0/1 ⠋ Container bahmni-standard-openmrsdb-1 Creating 0.0s Error response from daemon: image with reference bahmni/openmrs-db:1.0.0-standard was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64

don’t you think i may need to actually build an image of arm64 and push it to the any hub ?

This how i did the change

So my question is, where can we find the Dockerfile/s for creating the images at Bahmni’s image Hub https://hub.docker.com/u/bahmni

Coukd this be the place that has directions to build GitHub - Bahmni/default-config: Default configuration setup for bahmni.

I managed to get The EMR up and running, but what are the default username and password Logins for a fresh installation? the ones here are not working https://bahmni.atlassian.net/wiki/spaces/BAH/pages/61997323/Bahmni+Online+Demo

superman and Admin123 respectively.

I have tried starting Bahmni on mysql:8.0 , and it’s not starting. is standard having any compatibility issues with (mysql 8.0), I noticed openmrs couldn’t create openmrs.person_attribute_type



Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-update-to-latest.xml::1::upul:
     Reason: liquibase.exception.DatabaseException: Table 'openmrs.person_attribute_type' doesn't exist [Failed SQL: (1146) ALTER TABLE openmrs.person_attribute_type ADD edit_privilege VARCHAR(255) NULL]

@tendomart If you are starting with mysql:8.0, then please set the OPENMRS_DB_CREATE_TABLES environment variable to true. This is needed to so that the openmrs service initialises the database from fresh.

Thanks alot @mohant , I actually took a different path, built a fresh image with the help of bahmi-scripts, and hence created https://hub.docker.com/repository/docker/tendomart/openmrs-db/general but for arm64 architectures. and EMR actually started, though am now working with other components

But will also try to tinker with what you’ve suggested and see what happens.

@akhilmalhotra @mohant can we build custom bahmni-odoo and bahmni-metabase images using bahmni-scripts can’t find the Dockerfiles therein, are you using bahmni-docker/metabase/Dockerfile at master · mekomsolutions/bahmni-docker · GitHub and bahmni-docker/odoo-connect/Dockerfile at master · mekomsolutions/bahmni-docker · GitHub for those images ?

The dockerfiles are available in their individual repositories.

  1. bahmni/odoo-16 → bahmni-odoo-modules/package/docker/odoo/Dockerfile at main · Bahmni/bahmni-odoo-modules · GitHub
  2. bahmni/metabase → bahmni-metabase/package/docker/Dockerfile at main · Bahmni/bahmni-metabase · GitHub
2 Likes

Ooh thanks alot.

1 Like