Currently we are downloading and "installing" the dependencies for running various languages in the same step as the container. What we should do is moving them into multistage builds and only copying the results into the "runtime" container.
With that approach the dependency installation can be made in "parallel" which would decrease build time + caching.
At the same time we should check if it is possible to cache the compiling of the ruby binary.
Tasks:
[ ] Move each dependency into their own build stage
[ ] Check if Ruby binary compilation can be cached
[ ] Copy the Dependencies into the "runtime" container
Currently we are downloading and "installing" the dependencies for running various languages in the same step as the container. What we should do is moving them into multistage builds and only copying the results into the "runtime" container.
With that approach the dependency installation can be made in "parallel" which would decrease build time + caching.
At the same time we should check if it is possible to cache the compiling of the ruby binary.
Tasks: