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.
Hello 🙂 ,
Thank you for the awesome project! I noticed that when I was building the docker image that it was ~2.5Gbs, and I was curious if I could make it any smaller.
I know that a common trick in the docker community is to add
--no-install-recommends
toapt-get
( here is Canonical ( creators behind ubuntu ) mentioning how they reduced their image size by 60% just for that one addition ). Personally, I only do this when I notice that the image size is starting to get bigger. As a byproduct of this, I did have to add a few more packages ( which were implicitly installed with the recommended before ), so I added python3-dev, python-dev, python3-setuptools, python-setuptools, python3-wheel, and python-wheel.Also, I know a lot of projects remove the apt cache folder of
/var/lib/apt/lists/*
every time they run anapt-get install
. They do that because if you don't clear that folder out every it will commit those files in that steps size ( more on that here ).So, after adding those two I also added
RUN python3 -m pip install --upgrade pip
, to close #162 because it was preventing me from building.When I ran the build again it has reduced the size to ~1.8Gbs instead of the previous 2.5 before.
Here are the test results from the original build ( before my additions, except for adding the pip upgrade ( because it wouldn't build without it ) ), and here are the results I got from the tests with all my additions. ( got them by running the
run-tests.sh
script )I used these two versions ( original & mine ) to remove the timestamps at the front so I could
vimdiff
them and see if there were any major differences ( I didn't notice any ).If you want I could ( in another PR ) try to make the image size even smaller by trying a multi-stage build approach.
Let me know if there is anything else I should explain, or if you want me to make that other PR. 😁