It usually doesn't matter how large a docker image is. Network is fast and disks are cheap (server disks are usually big enough, nobody specs a large server with 80gb ssd, 300-500gb is the realistic minimum).
If size and memory usage matters (large amount of small workloads) then it might make sense to optimize for size. Can also easily be done with docker (distroless or alpine base image)