Working Docker cross-compiling for Fedora 39
Improvements to #2020 so that Fedora 39 now works.
- Does not require QEMU at all!
- Caches dnf metadata and downloads between rebuilds.
- Respects TARGETARCH as a Docker variable, adding DNF_ARCH instead.
- Reduces downloads and image size by ignoring weak dependencies.
~The image is still a little large at 591MB, twice what you have now. I'm not sure why, but I don't think you were doing dnf update before? That can bloat it quite a bit.~
I think you may need setcap to give Sunshine the correct permissions, but you didn't seem to have this before?
Hah, turns out I was comparing with the compressed size shown on Docker Hub.
Before: 902MB After: 591MB :partying_face:
Okay, a lot of this is down to me adding --setopt=install_weak_deps=False. This avoid big dependencies like LLVM via Mesa. I'm not sure whether we need such dependencies. If we do, we can maybe be more selective about it.
Thanks for digging into this. I will try to pick work back up on this soon.
I've tried to take the same approach for Ubuntu, but APT is not playing ball at all. This doesn't surprise me much, to be honest.
I don't think it's as critical for Ubuntu/Debian...
"Build and push" is the install sunshine step... you can see here it's rather quick even with qemu. https://github.com/LizardByte/Sunshine/actions/runs/7664452338/job/20888787801
Okay, think I'm about done now.
Sorry, I just can't follow this diff. Half of items marked as new were already in the target branch.
We also can't cache all the dependencies... we only get 10GB of cache, and regularly far exceed this as is.
I think I would rather just discuss what needs to change in #2020, rather than having a PR into it.