Live data from Hacker News

Show HN: dockerc – Docker image to static executable "compiler"

github.com

141–150 of 150 posts

Re: Show HN: dockerc – Docker image to static executable "compiler"

#141
post #105

This can be useful for certain people, but I am surprised the documentation (there is just the Readme) doesn't mention what happens when you already have a docker daemon- esp. what happens to all the networking/firewall tricks docker is using. I see potential for quite a number of operational issues. Nice to see Zig in action, btw. What about using Zon for deps, instead of a git submodule? Just curious if the author…

I don't expect this to interact with the docker daemon in any way. With networking executables generated by dockerc behave in the same way as a native application running outside a container. > What about using Zon for deps, instead of a git submodule? I couldn't find documentation quickly enough (dockerc was initially during a hackathon and was my first time using Zig). I plan to fix this eventually.

Great! Thank you for dissolving my doubts.

About Zon, I was just curious if you had any issues with it. I also need to finally start using it in my small projects.

Good luck with Zig!

Re: Show HN: dockerc – Docker image to static executable "compiler"

#142
post #109

Earlier 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…

Or you just use the app store version and it all works fine?

Re: Show HN: dockerc – Docker image to static executable "compiler"

#146
post #4
post #2

Nice idea! How does this actually work? I'm guessing it's wrapping a custom loader + docker + the image into an executable binary - or something like that?

Yep pretty much. The executables bundle crun (a container runtime)[0], and a fuse implementation of squashfs and overlayfs. Appended to that is a squashfs of the image. At runtime the squashfs and overlayfs are mounted and the container is started. [0]: https://github.com/containers/crun

Apologies for my ignorance, but how does squashfs fit into this picture? It seems I'm missing some pieces of the puzzle.

Re: Show HN: dockerc – Docker image to static executable "compiler"

#147
post #4

Earlier quoted context omitted.

Yep pretty much. The executables bundle crun (a container runtime)[0], and a fuse implementation of squashfs and overlayfs. Appended to that is a squashfs of the image. At runtime the squashfs and overlayfs are mounted and the container is started. [0]: https://github.com/containers/crun

Apologies for my ignorance, but how does squashfs fit into this picture? It seems I'm missing some pieces of the puzzle.

Ok, I've checked code a bit. We use squashfs to pack/unpack OCI Bundle, and for lower layer in OverlayFS.

Re: Show HN: dockerc – Docker image to static executable "compiler"

#148

Earlier quoted context omitted.

I know, she was asking for it right? Nice victim blame.

"Victim", as understood by most people, implies that someone did something wrong to them. There's nothing wrong with seeing someone's profile online, so your analogy doesn't apply. Thought exercise: Am I being a "victim" of you, because you posted a comment disagreeing with me?

There is no crime here is true. I really hope that's exactly what you mean.

However this person that is unstable or at least very aggressive and is clearly trying to track someone. I really hope you don't mean that because someone is publicly available that it is ok to do what you want to them.

IE "asking for it" because a person was around to commit a crime against so its their fault for not staying behind locked doors with a shotgun their whole life.

You are very close to simply stating that having an online profile makes it ok to do things to someone because you have dictated they should not have one if they don't want to be a victim of a crime in the future. You are also sort of imposing your view on everyone in the world that social media is not a necessary part of life nowadays. (that is a different debate)

Re: Show HN: dockerc – Docker image to static executable "compiler"

#149
post #141

Earlier quoted context omitted.

I don't expect this to interact with the docker daemon in any way. With networking executables generated by dockerc behave in the same way as a native application running outside a container. > What about using Zon for deps, instead of a git submodule? I couldn't find documentation quickly enough (dockerc was initially during a hackathon and was my first time using Zig). I plan to fix this eventually.

Great! Thank you for dissolving my doubts. About Zon, I was just curious if you had any issues with it. I also need to finally start using it in my small projects. Good luck with Zig!

I moved zig-clap to zon. Was alright. I appreciate that absence of a package registry.

Re: Show HN: dockerc – Docker image to static executable "compiler"

#150
post #89
post #86

Earlier quoted context omitted.

Singularity absolutely produces standalone executables, been building tools this way for years.

How? I've used Apptainer pretty extensively for a couple years and as far as I know the machine where it runs has to have Apptainer installed, even when executing sif files like a normal app.

I stand corrected, yes, you need run-singularity to be installed to execute the image, i completely forgotten.
Post reply on HN