Skip to content

Draft: Attempting to reduce the image size

Brian Douglass requested to merge reduce-image-size into master

Looking to get some feedback on this one before proceeding. Right now the final image size is 4 or so gigabytes (then multiply that by 3 for each architecture). That includes a bunch of stuff that developers may or may not need in the end. So this attempts to reduce that by:

  • Splitting the build into multiple stages and copying only relevant stuff to the final build
  • Moved some of the "static" things up above apt update/install. In theory since these rarely change we should only be forcing developers to download the changed layers, reducing the need to pull some data.
  • Split the build into multiple tags based on their use:
    • latest - the full fat image (for backwards compatibility)
    • latest-base - the image minus go/rust/godot stuff
    • latest-go - the base image + go stuff
    • latest-rust = the base image + rust stuff
    • latest-godot - the base image + godot stuff

By only using the base image developers cut out downloading around 2 gigabytes of data they don't need. If they do need go or rust then, since those images are based on the base one, they only need to download the extra go/rust specific layers. We would need to update clickable to take advantage of this feature.

Merge request reports