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

DBZ-7385 reduce docker image size #362

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

eizners
Copy link
Contributor

@eizners eizners commented Jan 25, 2024

@eizners eizners marked this pull request as ready for review January 25, 2024 17:06
# Stage 2: Final image
FROM registry.access.redhat.com/ubi8/openjdk-11

ENV SERVER_HOME=/debezium
Copy link
Member

Choose a reason for hiding this comment

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

So if there is a need to redefine SERVER_HOME here in this context of a multi-build step, then I'd probably advise we redefine all ENV variables to avoid any container image regression issues where someone may expect these variables to exist.

I could see situations where a container extends the default Debezium image and maybe use one of the shipped container scripts that rely on MAVEN_REPO_CENTRAL or maybe even the DEBEZIUM_VERSION. While we don't recommend using these images for production, we should avoid regression concerns. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added environment variables

@jpechane
Copy link
Contributor

@eizners Could you please share the sizes before and after?

@eizners
Copy link
Contributor Author

eizners commented Jan 29, 2024

The size of the image built from latest was 1.78 GB and 940 MB after.
Attaching evidence.
After
Before

@jpechane jpechane merged commit 5914396 into debezium:main Jan 31, 2024
5 checks passed
@jpechane
Copy link
Contributor

@eizners Applied, thanks!

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.

3 participants