@jpm @whitequark it used to be LXC for low-level container functionality (a bunch of CLI tools with a bunch of logic on top of kernel containers interface) + LXD on top of LXC, for nice UX to manage the containers.
Then Ubuntu did a takeover of LXD, so incus was born as a libre community fork of LXD.
But incus still uses LXC under the hood, and e.g. on alpine LXC is still a dependency of incus: https://pkgs.alpinelinux.org/package/edge/community/x86_64/incus
I'm not sure which LXC tools are you referring to or how or why linuxcontainers dot org would refuse service to them (seeing how LXC is still listed there https://linuxcontainers.org/lxc/ ) or which LXC commands are you referring to.

Introduction The image server at https://images.linuxcontainers.org has been in operation since early 2014, first offering images to LXC users through the download template and then once LXD came around, it was expanded to also provide LXD container and eventually virtual-machine images. The infrastructure used to build and distribute those images has always been purposefully kept community owned and operated. That’s so that every distribution represented on the image server is on equal footing...
@whitequark so it turns out the folks who run linuxcontainers dot org have basically told canonical to play hide and go fuck yourself and blocked container image downloads from LXC tools. Theres a very simple LXC-to-incus migration script available, and then everything just keeps on trucking after you change lxc to incus in commands lines.
Also, nested containers works, I’ve got podman running inside an incus guest without elevated privileges.
@whitequark to be most compatible with GitHub Actions the VM also needs to run systemd as init. Some of them bring their own init though.
In the end runcvm seemed most promising, it starts a "standard" qemu VM and can do systemd, but startup was super slow.
@whitequark I don't think I will spend more time with it, as I have no idea about containerd and firecracker and feel like I would just waste time with it.
To be fair, they explicitly say that the project is in a very early state.
@whitequark Docker and friends are definitely semi-trusted environments. You have to at least know the people who built the image IMO.
Does something like Firecracker help isolate them? It’s another layer, which feels somewhat pointless, but might be necessary for compatibility and security.
@whitequark Oh I see, different threat vector to what I was imagining. And yes, it has root, so you have no chance.
My mind is spinning towards single-use tokens from a secrets provider but it’s an immature thought so I’ll spare you.
I hope you figure it out.
@th current plan involves using firecracker or crosvm per tenant, which still has the problem i describe in the follow-up post
is there a way to make firecracker pretend it's docker? if not i can't really use it with Forgejo Actions
@whitequark @th at work we have an environment (on kubernetes, but could be ported to other things) where technically it’s running inside a container but docker works without the awful docker-in-docker hacks, this needs some careful application of user namespaces. I think various commercial offerings like exe.dev and bunny.net (their magic containers product) do things along these lines using kata containers.
The real problem is there are almost too many ways to do this and you get to integrate them yourself…
Yup, if your threat model is ‘friends who aren’t actively attacking your infrastructure and will do at least a bit of checking before they hit approve on PRs from other people’ that’s probably fine. I don’t think I’d trust any of those mechanisms for a high-profile project though, given how often privilege-elevation bugs in the Linux kernel are found.
I wouldn’t have thought any of these were easier for management than simply booting a VM with a bunch of preinstalled tools and a CoW base image, and the CI job settings exposed via something like qemufwcfg or a tiny FS on another virtual device.
@whitequark I've been able to do this just now:
podman run --rm -it --security-opt label=disable --user podman quay.io/podman/stable podman run -it --rm --user root registry.fedoraproject.org/fedora-toolbox
that's an image specifically built to use podman inside podman (or docker I guess?) and I'm running it as user and without --privileged and inside of it is a fedora toolbox and inside the fedora toolbox itself I was able to curl codeberg.org
This might be a good place to start from. Not sure what exactly makes the error about tun/tap not happen with this image, however