3 ms·
I explored the idea of using the scratch image with a cosmopolitan binary to get something more cross-architecture, but you need a shell to run those binaries.
by 8organicbits 3y ago
I explored the idea of using the scratch image with a cosmopolitan binary to get something more cross-architecture, but you need a shell to run those binaries. I'd love to see cross architecture Docker images, if someone else can figure out a trick to make it work.
- t0astbread 3y agoI think parent was pointing out that you need Linux to run Docker (since it doesn't run natively on any other OS) which is different from what Cosmopolitan provides. Edit: Ok, apparently it natively supports Windows for Windows containers and for everything else there's a Hyper-V integration. Not sure if you can write a portable Dockerfile script like that though.
- pjmlp 3y agoYou surely can, I have Dockerfiles that do it. It is a matter of having build parameters for base images and using programming languages that are mostly OS agnostic.
- alganet 3y agoJust use redbean and provide a init lua file. Or use a http://cosmo.zip http://cosmo.zip provided interpreter (like python, maybe even bash). Each ape file is also a valid zip file. Add your dependencies as if the ape was an archive: zip -ur myape.com mydependency.anything Also add a `.args` file: zip -ur myape.com .args For this .args file, put one argument per line. This will run on start. You can use `/zip/mydepencency.anything` to read from files, but if you have an executable dependency you'll need to extract it first (I use the host shell or host powershell for this). You can do this with any software you can compile with comsocc, by adding a call to LoadZipArgs[1] in the main function. It's easy to get started, your ideas will branch out as soon as you start playing with it. [1]: https://github.com/jart/cosmopolitan/blob/master/tool/args/args.c https://github.com/jart/cosmopolitan/blob/master/tool/args/a...