Improve our docker layering
Currently when we update a docker image, it has a big cost on the egress. This is mostly due to the fact that we rebuild from scratch everything and also that our base layer is updating the distro. A suggestion to solve this issue, and reduce to a minimum the egress when updating docker is to split the Dockerfile in pieces. Here's a proposal, we'll have to refine and adjust:
- Base layer, contains things we already need in the os, should rarely change (shared between gst-build and cerbero)
- Deps Layer, for gst-build specally, we need extra packages, this is updated sometimes
- Cold Cache, this is where we'd pull all the deps that don't change too often
- Hot Cache layer, this would be the top level layer, expected to be updated often
p.s. Maybe we want to more to freedesktop/ci-templates first ?