4 ms·
I like the binfmt_misc suggestion in the LWN comments. The fact that I could just run a jar file like it was an executable made me unreasonably happy when I fir
by pavon 5y ago
I like the binfmt_misc suggestion in the LWN comments. The fact that I could just run a jar file like it was an executable made me unreasonably happy when I first learned about it. It was one of those things (like X11 being network transparent) that made Linux seem almost magical to me as a 90's teen. Anyway, this seems like a perfect use case for that functionality.
- duskwuff 5y agoEven crazier: you can use binfmt_misc with qemu-user to transparently run Linux executables compiled for other architectures. Debian (and Ubuntu) packages the required configuration as "qemu-user-binfmt".
- gnufx 5y agoFor what it's worth, qemu-user-static is more general, e.g. for a foreign container image that won't find the shared library. (Wheeled out when it was said people needed to build ppc64le images on x86 boxes and it was impossible, rather than trivial.)
- lloeki 5y agoThat's exactly what Docker does behind the scenes to run foreign arch images, see https://github.com/tonistiigi/binfmt https://github.com/tonistiigi/binfmt
- hyc_symas 5y agoYeah, and a.out format is trivial enough that it wouldn't be much code to load these things.