5 ms·
What is the main benefit over doing something like: docker run --runtime krun --rm -it -v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(p
by sureglymop 1mo ago
What is the main benefit over doing something like:
docker run --runtime krun --rm -it -v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(pwd)) --network restricted-net ghcr.io/openai/codex-universal:latest sh
That runs the codex OCI in a qemu microvm. From what I can see, more fine grained network and filesystem access control as well as convenience?
- defraxi 1mo agoThe credentials part... https://docs.docker.com/ai/sandboxes/security/credentials/ https://docs.docker.com/ai/sandboxes/security/credentials/
- ShinyLeftPad 1mo agoIt seems to do a good job of not stating the actual threat model anywhere.
- codethief 1mo agoYes, pretty much, except for one detail: > That runs the codex OCI in a qemu microvm. AFAIU it's actually the other way around: krun spawns a libkrun-based (not QEMU-based) VM inside a crun container. Source: https://github.com/libkrun/libkrun/discussions/538#discussioncomment-15765542 https://github.com/libkrun/libkrun/discussions/538#discussio... So with your solution you get the additional security benefit of containerizing the hypervisor on the host.
- figmert 1mo agoOnce you have a vm, the container provides next to no additional security benefits. It's just unnecessary overhead at that point.
- codethief 1mo agoThat's not correct. Virtio devices have different security properties and many of them expose the host system to considerable risks. Using containerization on the host is one way to limit the latter. See e.g. https://github.com/libkrun/libkrun/#security-model https://github.com/libkrun/libkrun/#security-model for more details.
- figmert 1mo agoWell, I stand corrected! Thanks for the link
- mdavidn 1mo agoAside from hiding agent credentials from the agent, it also runs an isolated Docker Engine for the agent to use freely.