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

Multi-stage build in Python Dockerfiles to decrease container image size #1121

Merged
merged 6 commits into from
Nov 30, 2022

Conversation

mathieu-benoit
Copy link
Contributor

@mathieu-benoit mathieu-benoit commented Nov 29, 2022

Multi-stage build in Python Dockerfiles to decrease container image size (and potentially the surface of attack), like we do there https://github.com/GoogleCloudPlatform/microservices-demo.

  • loadgenerator: 85.9MB --> 63.1MB (-22.8MB)
  • contacts: 104.4MB --> 76MB (-28.4MB)
  • frontend: 79.9MB --> 61.7MB (-18.2MB)
  • userservice: 104.4MB --> 76MB (-28.4MB)

Note: no change on the number of CVEs.

@mathieu-benoit mathieu-benoit requested a review from a team as a code owner November 29, 2022 22:53
@mathieu-benoit mathieu-benoit self-assigned this Nov 29, 2022
@mathieu-benoit mathieu-benoit marked this pull request as draft November 29, 2022 22:54
@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

2 similar comments
@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

@mathieu-benoit mathieu-benoit changed the title loadgenerator - Multi-stage build in Dockerfile to decrease container image size Multi-stage build in Python Dockerfiles to decrease container image size Nov 30, 2022
@mathieu-benoit mathieu-benoit marked this pull request as ready for review November 30, 2022 00:05
@mathieu-benoit
Copy link
Contributor Author

Ready for your review, thanks!

@mathieu-benoit mathieu-benoit added the python Pull requests that update Python code label Nov 30, 2022
Copy link
Member

@bourgeoisor bourgeoisor left a comment

Choose a reason for hiding this comment

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

This LGTM!

@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

2 similar comments
@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

@github-actions
Copy link

🚀 PR staged at http://34.173.75.188

@mathieu-benoit mathieu-benoit merged commit 0255140 into main Nov 30, 2022
@mathieu-benoit mathieu-benoit deleted the mathieu-benoit-patch-1 branch November 30, 2022 21:11
big-appled pushed a commit to big-appled/bank-of-anthos that referenced this pull request Jun 9, 2023
… size (GoogleCloudPlatform#1121)

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants