Closed johnmcollier closed 4 years ago
Some areas to look at:
Many of these templates are still coming from microclimate-dev2ops, and also include out of date readme/splash screens and Jenkinsfiles. FYI, I've talked to a couple people (but primarily Toby) about copying these to another org and then doing some general cleanup, I don't know if we have an issue open for that.
@deboer-tim I've actually been meaning to follow up about creating a codewind-templates
org on Github. I don't see an issue Github for that currently, but I'll go open one.
issue https://github.com/eclipse/codewind/issues/1788 is investigating using UBI that could well help in this area
closing as moved to centos everywhere
The overall size of the docker images we use in our templates (both as the base-layer and the resultant, built image) is getting to be too large. This leads to a small number of images taking up a lot of space on the user's machine, and on their docker registry. It also leads to overall longer build times, as more time needs to be spent pulling the base image, and pushing the built image up to a Docker registry.
Furthermore, Kube needs to pull the docker image before the application is deployed, so the larger the project's docker image, the longer it will take to start the application.
Our templates have the following sizes, when pushed to Dockerhub (which compresses the layers a fair bit, so overall size will be larger on the user's machine or cluster):
If we make use of smaller overall base images and multi stage builds, we can reduce the overall footprint a fair bit. For example, if we change the Go template's dockerfile to use alpine and a build-stage:
The resultant image is only 7MB on Dockerhub, which is much more reasonable for a hello world app.
We should look at what improvements and optimizations we can make to our project templates to improve and optimize the resultant size of their docker images, and to reduce overall build time.
I recommend also looking at https://blog.docker.com/2019/07/intro-guide-to-dockerfile-best-practices/