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

Build ehrbase image using jlink with custom jre #1285

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alexlehn
Copy link
Contributor

@alexlehn alexlehn commented Apr 22, 2024

Changes

Switch to a multistage docker build that uses jlink to create a custom jre for ehrbase. The final image is now based on a simple alpine base image with an extracted spring jar and reduced jre. Further more the slimmer image contains less installed libs and tools as well as a stripped down jvm, what makes it less vulnerability.
As a side efect the bootup time is also decreased because ehrbase is not started as a fat jar any more.

Image size change

ehrbase/ehrbase               stripped-down      54527239f52f   11 minutes ago   181MB
ehrbase/ehrbase               2.0.0              997d841ba5f8   10 days ago      298MB

bootup time (rough average on my machine ;)

# ehrbase/ehrbase:stripped-down
Started EhrBase in 3.146 seconds (process running for 3.452)

# ehrbase/ehrbase:2.0.0
Started EhrBase in 3.976 seconds (process running for 4.27)

wget is still available in case someone needs to perform som healthcheck commands.

Pre-Merge checklist

  • New code is tested
  • Present and new tests pass
  • Documentation is updated
  • The build is working without errors
  • No new Sonar issues introduced
  • Changelog is updated
  • Code has been reviewed

@alexlehn alexlehn force-pushed the feature/tweak-docker-image branch 4 times, most recently from cf98856 to 5b44f3e Compare April 22, 2024 08:35
Copy link

github-actions bot commented Apr 22, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
1402 0 139 1402 100 0s

@alexlehn alexlehn force-pushed the feature/tweak-docker-image branch 9 times, most recently from 7ab3526 to 4bce184 Compare April 23, 2024 06:14
Copy link

sonarcloud bot commented Apr 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@alexlehn alexlehn force-pushed the feature/tweak-docker-image branch from 4bce184 to 7656fb3 Compare May 24, 2024 08:52
Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

None yet

1 participant