We have a lot docker images that we need to upload to k8s, it works however when we start a new node this process can take a lot of time.
We try to change the images to use "multi-stage" builds however still this process take a lot of time and we didn't saw significant change on the start time on new node.
Now we try the following: (however we not sure how much impact we will see ...)
Try (as much as we can) to use the same docker images from
, example all the images which use alpine to use the exact same version (3.11) and not some of using version 3.10
and some 3.10.1
and some 3.11
etc , this will prevent the reuse mechanism of docker to layers that already cashed ...
Reduce the layers numbers , with combining the RUN
commands to one instead of many.(we need to do it for many docker files...) , not sure how docker mechanism will help here to achieve our goals
All this process to change both of using the same version and reduce layers can take a lot of time to do, are we are wasting our time or there or this is something that can reduce the load time ? is there any other idea which may help us ?
We have many docker images based on Golang, NodeJS, java, etc.
so you are on the correct track
I think you can not reduce size further. Just try docker squash but this will not help much.
So how you can boot your nodes faster?