Skip to content

Dockerfile enhancement: multistage build #991

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

Merged
merged 1 commit into from
Apr 16, 2025
Merged

Conversation

vidixha
Copy link

@vidixha vidixha commented Apr 15, 2025

This issue aims to refactor the current Dockerfile to use a multistage build approach. The motivation for this change is to:

  1. Reduce final image size by excluding unnecessary build-time dependencies (e.g., gcc, libpython3-dev, etc.)
  2. Enhance maintainability by clearly separating build and runtime concerns
Size of the current docker image: 3.82GB
Size of the docker image after multi-stage build: 1.06GB

Closes #990

Copy link

google-cla bot commented Apr 15, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@vidixha
Copy link
Author

vidixha commented Apr 15, 2025

Hi @DonggeLiu, could you please review this when you get a chance?
Thanks in advance!

@DonggeLiu DonggeLiu changed the base branch from main to exp-991 April 16, 2025 01:26
@DonggeLiu
Copy link
Collaborator

Thanks @AkshataABhat
I will merge this into #995 to run experiments before merging this into main.

@DonggeLiu DonggeLiu merged commit a79a0d3 into google:exp-991 Apr 16, 2025
1 of 2 checks passed
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.

Dockerfile Enhancement- Multistage Docker build
2 participants