Show HN: dockerc – Docker image to static executable "compiler"
121–130 of 150 posts
Re: Show HN: dockerc – Docker image to static executable "compiler"
#122The README indicates that this tool will only support Windows and MacOS through emulation. I find that odd. Let's face it, if you're using Linux, you're comfortable typing some stuff into the terminal to install software. Or if you aren't comfortable with it yet, you will be soon. That's just the reality of using Linux. Even ignoring that, snap and flatpak apps provide a generally awful user experience, and I fail to…
> It would make sense that a tool like this would prioritize MacOS/Windows support above all else. Yep, unfortunately I've not had the time to make it work well on those platforms. I got an initial demo working on MacOS but I'm currently facing the issue that I'm unable to statically compile QEMU on MacOS. I've also started writing a VirtualizationFramework[0] based backend. > Why would QEMU even necessary? Docker ru…
I can't comment on MacOS as I haven't used it regularly in several years, and even then I only used Docker briefly on MacOS.
I can see how this approach would result in reliably cross-platform applications, but it immediately raises a couple of concerns: binary size, and interoperability with the underlying OS.
Docker on its own can already be very large. Shoving it inside of QEMU adds even more largeness. Are binary sizes a priority at all? If so, how do you plan to keep them reasonably compact?
I'll assume that user-facing software is the main target for this tool, which means that GUI support is really important. By hosting an application inside of QEMU and Docker, you create a very long and complicated path that stuff must travel through in order for a dockerc'd GUI application to interact with other programs. It's pretty easy to plumb an X server into WSL, but there are limitations when you get into more nuanced interactions with the rest of the machine (ex: clicking and dragging files into the window). Docker adds yet another layer that could cause trouble.
I wish you luck. I tried to make a similar tool for a game engine a while back, and it was absolutely hellish.
Re: Show HN: dockerc – Docker image to static executable "compiler"
#123Earlier quoted context omitted.
You should also be able to do that with Cosmopolitan/APE.
Would you be able to expand on this, my impression is that these tools build a custom c program instead? Thanks
Re: Show HN: dockerc – Docker image to static executable "compiler"
#124I absolutely love how we are going full circle to portable executable binaries but with embedded OS. Taking the whole "it works on my machine" to a whole new level of troubleshooting hell. Awesome project though.
Every decent application should be a portable executable binary!
Re: Show HN: dockerc – Docker image to static executable "compiler"
#125Earlier quoted context omitted.
Im surprised no one mentioned that the program the unstable ranter wants is essentually a social media stalker app to find people on all social media sites. Perhaps some barriers to use are good sometimes.
If they don't want people to find their social media profiles, then they shouldn't have social media profiles.
Nice victim blame.
Re: Show HN: dockerc – Docker image to static executable "compiler"
#126What about Cosmopolitan and WASM? ;) Cosmopolitan libc allows compiling of a single binary that runs on multiple OS platforms without modification – maybe Dockerc could use this to create a more universally portable container binary? WASM binaries could run in the browser, or another WASM VM, including securely sandboxed environments that spin up fast. I understand that newer Docker builds can use WASM under the hood…
Unfortunately cosmopolitan wouldn't work for dockerc. Cosmopolitan works as long as you only use it but container runtimes require additional features. Also containers contain arbitrary executables so not sure how that would work either... As for WASM, this is already possible using container2wasm[0] and wasmer[1]'s ability to generate static binaries. [0]: https://github.com/ktock/container2wasm [1]: https://wasmer.…
Edit: This was already answered here https://news.ycombinator.com/item?id=39622184
Re: Show HN: dockerc – Docker image to static executable "compiler"
#127This is really great. I have been trying to get my docker to be more distributable. Right now it's just a simple python script in a python env inside a docker container inside a QEMU container to automate a click and then netcat something. Pretty sweet. It's only like 20GB, so pretty lightweight by modern standards.
You jest, but python is the poster child for, works on my machine.
Re: Show HN: dockerc – Docker image to static executable "compiler"
#128I suppose dockerc could be convenient when you already have a Docker image on hand, especially if it was a PITA to create or its creation is a lost art.
Besides fat executables, `nix bundle` also lets you create Docker images, AppImages, and images/executables in a few other formats.
--
1: https://github.com/matthewbauer/nix-bundle
2: https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni...
Re: Show HN: dockerc – Docker image to static executable "compiler"
#129Earlier quoted context omitted.
You jest, but python is the poster child for, works on my machine.
Unless you're on Windows 11. You open the console, type "python", for some reason the Windows App Store launches and goes to a "python app". You think to yourself you should probably install Python from the source, so you go to pythons website and download and run the installer, you select "add to path", you run it and it STILL goes to the Windows App Store. So at this point you Google It. You find that you need to u…
Re: Show HN: dockerc – Docker image to static executable "compiler"
#130Folks will literally shove a container runtime, FUSE, and operating system image into a binary to avoid going to thera... learning Nix.
But Nix is the best way to build images for dockerc.
# nix bundle nixpkgs#hello
# ./hello
Hello, world!
https://news.ycombinator.com/item?id=39632011