You can walk backward in DockerFile. You can uninstall/cleanup "groups" "packages" to slim down. You can create your custom minimal image from that cloud image.It is like just a snapshot of a specific image at some point.
This is the minimal position. This is when the baby is born.
You may want to look at kickstart/preseed if you want deep-diving.It is about being an official image or some image on which you have full control. ]2