Why not use any of the existing OCI Runtimes? They take well-defined[0] JSON description as input, and are pretty well-contained (single static binary). And because they are separate binaries, not libraries, you don't need to worry about things like thread safety or FD leaking. [0] https://github.com/opencontainers/runtime-spec/blob/main/con...
I’m currently exploring this for an AI context because I haven’t found a better solution for letting K8S manage AI workloads that need direct GPU access on OSx
Building a Linux Container Runtime from Scratch
31–40 of 70 posts
Re: Building a Linux Container Runtime from Scratch
#32We are an algorithmic trading company [0], and our trading strategies are primarily built as pure Rust libraries. We've been searching for a way to sandbox the strategies we host, as not all of them are signed or open source for verification. Styrolite seems like a promising solution to address this issue, so we’re planning to give it a try. [0]: https://cycletop.xyz
Re: Building a Linux Container Runtime from Scratch
#33> Importantly, we designed Styrolite with full awareness that Linux namespaces were never intended as hard security boundaries—a fact that explains why container escape vulnerabilities continue to emerge. Our approach acknowledges these limitations while providing a more robust foundation. So what do you do, exactly?
Once you have set up the namespaces you drop all capabilities so if the program gets hacked while it's running it can do very little.
Re: Building a Linux Container Runtime from Scratch
#34> Importantly, we designed Styrolite with full awareness that Linux namespaces were never intended as hard security boundaries—a fact that explains why container escape vulnerabilities continue to emerge. Our approach acknowledges these limitations while providing a more robust foundation. So what do you do, exactly?
Once you have set up the namespaces you drop all capabilities so if the program gets hacked while it's running it can do very little.
They can do very little anyway, that way.
Re: Building a Linux Container Runtime from Scratch
#35Earlier quoted context omitted.
No, I mean, what do the Edera developers do differently, in order to provide more robust foundation with this new container runtime called Styrolite? They still use Linux namespaces, as far as I can tell from TFA.
Edera developer here, we use Styrolite to run containers with Edera Protect. Edera Protect creates Zones to isolate processes from other Zones so that if someone were to break out of a container, they'd only see the zone processes. Not the host operating system or the hardware on the machine. The key difference here between us and other isolation implementations is that there is no performance degradation, you don't…
What do you mean by "zone" exactly?
Re: Building a Linux Container Runtime from Scratch
#36Earlier quoted context omitted.
No, I mean, what do the Edera developers do differently, in order to provide more robust foundation with this new container runtime called Styrolite? They still use Linux namespaces, as far as I can tell from TFA.
Edera developer here, we use Styrolite to run containers with Edera Protect. Edera Protect creates Zones to isolate processes from other Zones so that if someone were to break out of a container, they'd only see the zone processes. Not the host operating system or the hardware on the machine. The key difference here between us and other isolation implementations is that there is no performance degradation, you don't…
How does your approach compare to Google's gVisor?
Re: Building a Linux Container Runtime from Scratch
#37> Importantly, we designed Styrolite with full awareness that Linux namespaces were never intended as hard security boundaries—a fact that explains why container escape vulnerabilities continue to emerge. Our approach acknowledges these limitations while providing a more robust foundation. So what do you do, exactly?
Re: Building a Linux Container Runtime from Scratch
#38Earlier quoted context omitted.
Once you have set up the namespaces you drop all capabilities so if the program gets hacked while it's running it can do very little.
honest question: how is this any better than running non-root containers? They can do very little anyway, that way.
Styrolite is a container runtime engine that runs containers in a virtual machine guest environment with no shared kernel state. It uses a type 1 hypervisor to fully isolate a running container from the node and other containers. It's similar to Firecracker or Kata containers, but doesn't require bare metal instances (runs on standard EC2, etc) and utilizes paravirtualization.
Re: Building a Linux Container Runtime from Scratch
#39Earlier quoted context omitted.
Edera developer here, we use Styrolite to run containers with Edera Protect. Edera Protect creates Zones to isolate processes from other Zones so that if someone were to break out of a container, they'd only see the zone processes. Not the host operating system or the hardware on the machine. The key difference here between us and other isolation implementations is that there is no performance degradation, you don't…
What underlying primitives are you relying on to provide isolation, if not linux namespaces? How does your approach compare to Google's gVisor?
Styrolite runs containers in a fully isolated virtual machine guest with its own, non-shared kernel, isolated from the host kernel. Styrolite doesn't run a userspace kernel that traps syscalls; it runs a type 1 hypervisor for better performance and security. You can read more in our whitepaper: http://arxiv.org/abs/2501.04580
Re: Building a Linux Container Runtime from Scratch
#40Isn’t the gold standard of containerisation gVisor? Can’t get much more restrictive than proxying and filtering syscalls. As far as I remember it’s the default runtime on GKE.