Making docs image 40% smaller and also making python version upgrades easier for multi-stage builds.#2836
Merged
browniebroke merged 7 commits intocookiecutter:masterfrom Dec 24, 2021
Conversation
2 tasks
# Conflicts:
# {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile
47b5354 to
a2518b6
Compare
It was enabled by default on pip 20.3, and the Docker image uses 21.2
browniebroke
approved these changes
Dec 24, 2021
Member
browniebroke
left a comment
There was a problem hiding this comment.
I've merged the latest changes from master and tweaked a couple of things.
Member
|
Thank you for your contribution 🎉 |
Contributor
Author
|
Thanks @browniebroke Happy to help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I am proposing to use multi-stage builds for building the python part of Docs.
This can be done by installing all required OS and python dependencies and then to just copy over those files to the run stage. This would cause a nearly 35-40% reduction in size!
Checklist:
tests/test_cookiecutter_generation.pyis updated accordingly (especially if adding or updating a template option)Rationale
Smaller images are highly desirable because they would greatly reduce the time of re-deployment and deployment of containers and would also save a lot of time and money especially bandwidth costs.