Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK-319: Improve the build-distro command by allowing per-version cutomizations. #244

Closed
wants to merge 1 commit into from

Conversation

wikumChamith
Copy link
Member

@wikumChamith wikumChamith commented Jul 28, 2023

This generates a Docker image based on Java 8 for OpenMRS versions 2.0-2.3 and Java 11 base image for 2.4 and newer versions.

JIRA: https://issues.openmrs.org/browse/SDK-319

@@ -307,7 +307,7 @@ private void copyDockerfile(File targetDirectory, DistroProperties distroPropert
copyBuildDistroResource("Dockerfile-jre7", new File(targetDirectory, "Dockerfile"));
}
} else {
if (isPlatform2point5AndAbove(platformVersion)) {
if(isBetweenPlatform2point0and2point3(platformVersion)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we tested this to verify that it works?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I manually tested this.

@@ -0,0 +1,23 @@
FROM tomcat:8-jre11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be best if we could replace these Dockerfiles with something based on openmrs-core, probably not too dissimilar from what we do in the distro-referenceapplication repo: https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/Dockerfile (I'd actually like to swap out the Dockerfile there for a version built by the SDK).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibacher, @dkayiwa any insights on how we should do this??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just imaging having a Dockerfile like:

FROM openmrs/openmrs-core:nightly-amazoncorretto-11

COPY openmrs.war /openmrs/distribution/openmrs_core
COPY modules /openmrs/distribution/openmrs_modules
COPY owa /openmrs/distribution/openmrs_owa

We'd also have to likely update the script here to handle the O3 SPa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants