4 ms·
For Python and other interpreters one does not need containers. LD_PRELOAD and similar hacks is sufficient to redirect reading of script files into reading from
by fpoling 8y ago
For Python and other interpreters one does not need containers. LD_PRELOAD and similar hacks is sufficient to redirect reading of script files into reading from a file system embedded into the executable.
- Annatar 8y agoLD_PRELOAD in combination with LD_LIBRARY_PATH is meant to be used by a programmer debugging and testing his or her own shared object library, not for using software in production.
- fpoling 8y agoBy "similar hacks" I meant something like embedding a custom loader into a fully static binary that runs the interpreter and loads its libraries from the embedded filesystem while patching libc calls.
- TheDong 8y agoWhy would you bother with such difficult and fragile hacks when you could instead simply have the kernel itself remap those file-related calls with a mount namespace or chroot?
- megous 8y agoWhy would you invlove the kernel at all, since you have access to Python's code itself, and can just make your own version of python, that will source files from wherever you want. And your package will be protable to Windows, too.