Open silkroadnomad opened 4 years ago
hey @inspiraluna, my initial analysis is:
RUN
clauses, which leads to multitude of docker layers inside the image and doesn't work well with caching. if we can somehow combine multiple RUN
clauses into a single or maybe two, it'll help.I'll post a dive analysis of the image later on, which will help us understand it much better
@inspiraluna i've analyzed the docker image. Here are the findings:
RUN
statement from line 9 of base.Dockerfile
leads upto: 1.5 GB, these all are either dev tools (vim, jq, bc, git) or compile utils (build-essentials,apt-utils and other libs), we should remove these after compiling the meteor app.RUN
statement on line 62 of base.Dockerfile
leads upto a whopping 2.8GB, i'm sure we can do something around here to make it all light.RUN
clause of main Dockerfile
, line 78 sums upto 1.3 GB of size, here we have very little to improve i believe.The final decompressed image is 6.7GB and size on docker hub is 1.7GB (compressed).
I think we we focus our efforts into these 3 checkpoints, we should be able to reduce the size of our image by a significant factor
Hey @inspiraluna, i believe the above mentioned analysis should be enough to get us started and cut the size of the image by at least 30-40%. Please let me know if you have any inputs
The Doichain/dApp docker image seems far to big. An analyzes needs to be investigated what are the things which make it so big and how could we reduce it later on. Please provide your suggestions in the Github Issue.