I was able to strip down the docker image engine size by removing the client and server builds from the container. My game is a single player game so that wasn’t needed for me. One thing to note, if you do need to build servers then this will most likely no help you.
ue4-docker build $version -username $user -p $token --exclude debug --exclude templates --monitor --opt buildgraph_args="-set:GameConfigurations=Shipping;Development -set:HostPlatformOnly=true -set:WithClient=false -set:WithServer=false" --visual-studio=2022;
The things that will help you here is excluding debug symbols, excluding the engine templates, making sure you only build the configurations that you need, making sure you only build the host platform, not building the client and not building the server