Skip to content

Use different base images for frauddetectionservice#691

Merged
cartersocha merged 7 commits into
open-telemetry:mainfrom
svrnm:use-different-base-images-for-frauddetectionservice
Jan 18, 2023
Merged

Use different base images for frauddetectionservice#691
cartersocha merged 7 commits into
open-telemetry:mainfrom
svrnm:use-different-base-images-for-frauddetectionservice

Conversation

@svrnm

@svrnm svrnm commented Jan 17, 2023

Copy link
Copy Markdown
Member

Changes

This PR changes the base images used for building & running frauddetectionservice:

  • For the builder it uses the gradle image, so downloading gradle is not necessary anymore since it is part of the image. This improves the build time a little bit (for me from ~70s to 60s), especially when doing repeated builds
  • For the final image it uses a distroless java image, which reduces the overall size down to 271MB from 509MB.

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs folder

@svrnm
svrnm requested a review from a team January 17, 2023 08:52

@mviitane mviitane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a win-win for both build time and image size.

$ docker compose build frauddetectionservice --no-cache
Build time: 70.9s -> 54.9s
Image size: 509MB -> 271MB

@svrnm

svrnm commented Jan 18, 2023

Copy link
Copy Markdown
Member Author

Maybe to add this as a note: it looks like that python3.10 builds faster overall than python3.11 because of the availability of certain "wheels": if I go for 3.11 it starts to compile a bunch of things while for 3.10 it looks like they can easily be downloaded, maybe something that can also help with other python services.

@cartersocha
cartersocha merged commit 17c9ade into open-telemetry:main Jan 18, 2023
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
* Use different docker base images for frauddetection service

Signed-off-by: svrnm <[email protected]>

* Add entry in CHANGELOG

Signed-off-by: svrnm <[email protected]>

* update changelog

Signed-off-by: svrnm <[email protected]>

* Remove extra blank line

Signed-off-by: svrnm <[email protected]>
Co-authored-by: Juliano Costa <[email protected]>
Co-authored-by: Carter Socha <[email protected]>
mohamed3637 added a commit to mohamed3637/opentelemetry-demo that referenced this pull request Oct 7, 2025
* Use different docker base images for frauddetection service

Signed-off-by: svrnm <[email protected]>

* Add entry in CHANGELOG

Signed-off-by: svrnm <[email protected]>

* update changelog

Signed-off-by: svrnm <[email protected]>

* Remove extra blank line

Signed-off-by: svrnm <[email protected]>
Co-authored-by: Juliano Costa <[email protected]>
Co-authored-by: Carter Socha <[email protected]>
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.

5 participants