Using amazoncorretto as base image for Bahmni Docker Images

For building Bahmni Docker Images we have been using openjdk:8 as the base image. But now the official builds of openjdk has been deprecated and is not up-to-date with latest security patches. Please look this for more info.

So we started analysing some of the distributions like temurin, corretto, ibmjava etc. On comparison amazoncorretto:8 seems to be better, since it gives the following advantages.

  1. It is up-to-date with the latest security patches(amazoncorretto - Docker Image Security Analysis | Snyk) and release happens every quarter.
  2. It also has some of the enhancements back-ported from versions above openjdk8
  3. Also has an extended End-Of-Life for amazoncorretto:8.

amazoncorretto is also GNU Public License version 2 licensed.

So we are updating the base images to amazoncorretto:8 in the builds of bahmni docker images. Please look into this JIRA for more info.

@n0man @mradul.jain @gsluthra @angshuonline @binduak @swatigogia @rohit.yawalkar

1 Like

Wow! thanks for informing.

  1. We may need to re-publish Bahmni performance metrics if we are changing the underlying JVM, and compare the two.
  2. We should prioritise moving away from JDK8… to newer versions (i feel we can do that for all except possibly OpenELIS, which is anyways being dropped soon). Looks like even this support will end in 2024. So, we better prioritise Java upgrade soon!!

cc: @angshuonline @binduak

2 Likes

It appears that even #OpenMRS needs to then update its docker base image, to ensure a secure version of JDK is shipped, and we use the same one.

cc: @grace @angshuonline @mohant @burke @dkayiwa @ibacher

@raff do you have any comment on this?

1 Like

Yeah, we need to update as well. amazoncorretto:8 seems to be a good choice. Thanks for sharing and staying on top of things.

4 Likes

Hello @raff, Bahmni team is using openmrs/openmrs-distro-platform:2.5.7 as the base image to build bahmni/openmrs image. We would like to know about a few things.

  1. Where is the CI for openmrs-distro-paltform image, is it built from Github Actions and pushed to dockerhub or from somewhere else ?
  2. Is this the dockerfile that is used to build the image ?
  3. openmrs-distro-platoform:2.5.7 still runs on Tomcat 7.0.94, which has already reached End-of-Life. on March 2021. Is there any plans to upgrade to Tomcat 8 ?

cc. @gsluthra @angshuonline @ibacher @grace @binduak @rohit.yawalkar @n0man @swatigogia

1 Like
  1. This is the plan OpenMRS Platform - OpenMRS Platform 2.5.x - Push docker image 69: Job result summary - OpenMRS Bamboo and this is the repo GitHub - openmrs/openmrs-distro-platform at 2.5.x Please note that the image will be updated this month to what we have in the master branch GitHub - openmrs/openmrs-distro-platform: This project is used to package the core OpenMRS war file with bundled modules

  2. Yes, that’s the Dockerfile. Again it will be updated soon to what we have in the master branch at openmrs-distro-platform/Dockerfile at master · openmrs/openmrs-distro-platform · GitHub

  3. The master branch has been already updated to Tomcat 8.5. It’s based on openmrs-core/Dockerfile at master · openmrs/openmrs-core · GitHub

Thanks @raff. Please update when the new images are published. Will incorporate and test it out.

Hello @raff Good day. Do yo have any updates about the new openmrs images ? Can you please help with an estimated time on when the new images would be available on docker hub for use ?

cc. @gsluthra @mradul.jain @binduak

1 Like

@mohant it wasn’t a quick change as the base OS changed from debian to amazon linux. It required a number of changes in packages and a bit more testing. I’m expecting to be done next week.

4 Likes

@raff Do you have any updates to share on the new openmrs images?

Change to openmrs-core master has been pushed and is published as nightly on dockerhub already. I’m updating platform and refapp right now and soon after I’ll backport to openmrs-core 2.5.x and platform. I should be done in a few hours.

1 Like

That’s great. Thanks for the update @raff. Please put up a message on this thread once you are done on 2.5.x branch.

@mohant I need to wait with committing the changes to platform until 2.5.8 release is complete. openmrs-core 2.5.8 has been released with the old approach and there’s a pending 2.5.8 platform release. A good news is that openmrs-core 2.5.x-nightly image is available so you could start testing from that and switch to platform once ready. You can have a look at the platform master branch to get a feeling how to use it. Just replace dev and nightly with 2.5.x-dev and 2.5.x-nightly.

@ibacher, @dkayiwa do you have any timeline for releasing the 2.5.8 platform OpenMRS Platform - OpenMRS Platform 2.5.x: Plan summary - OpenMRS Bamboo ?

In general, for point-releases of core, I think we’ve only done a platform release if it’s specifically requested, i.e., not every release of core has necessarily meant we’ve needed a release of the platform…

Good, thanks! I’ll then proceed with applying changes to the build.

@mohant the platform 2.5.x-nightly image is available on dockerhub. I’m planning to do a release of core and platform 2.5.9 on Tuesday next week so you can base your image on a released version.

1 Like

Thanks @raff. We are planning to use openmrs-core:2.5.x-nightly and start testing.

By the way do you have any documentation on the environment variables that can be set? I could see there are number of variables possible in the startup script and some them seems to be different from existing environment variables.

Thanks

@mohant I’ll update the docs before releasing. The startup-init.sh contains all supported variables. They are extracted to this one file to make it clear. The goal is to unify variables across all images: core, platform, refapp, o3.

1 Like

Hello @raff. We have built bahmni/openmrs image based on openmrs-core:2.5.x-nightly image and it works both on Intel chip as well as M1 chip machines. Thanks for the fixes and refactoring. We will test it more in the upcoming days and let you know.

When can we expect the release of openmrs-core:2.5.9 so that we can base our image with a specific tagged release ?

cc. @mradul.jain @gsluthra @umairfayaz

Thanks

3 Likes