Container vs gVisor

A container is an isolated process that shares the host kernel. gVisor is an application kernel from Google. gVisor makes only a minimal set of system calls to the host kernel.

Updated

Container

Shares the host kernel and runs OCI images.

Type
Container
Own kernel
No
Used by
AgentBay, Anthropic Code Execution, Daytona, Beam Sandboxes, Gemini Enterprise Agent Platform Code Execution, Upstash Box, Sendblue Sandboxes, Agent Sandbox, Apify AI Code Sandbox, Containarium Cloud, OpenAI Code Interpreter, Perplexity Sandbox, Sandock

gVisor

An application kernel from Google.

Type
User-space kernel
Own kernel
In user space
Used by
Agent37 Cloud, StateSet Sandbox, Bunny Sandbox, Modal, Brimble Sandboxes, Sandbox0, xShellz Agent Shell

How they differ

4 fields, side by side

Container
gVisor
Isolation method
Container: Linux namespaces and cgroups
gVisor: User-space kernel, the Sentry, written in Go
Kernel for app system calls
Container: The shared Linux kernel
gVisor: The Sentry, in user space
System calls to the host
Container: Go to the host kernel
gVisor: None passed through. The Sentry makes a minimal set of host calls.
Image format
Container: OCI images
gVisor: OCI images, through the runsc runtime

When the difference matters

The gVisor docs say a plain container is only one system call away from host compromise. gVisor was created to add defense against kernel bugs that untrusted code could exploit. It keeps the same OCI image format.

Which one to look for

Check whether the provider runs plain containers or gVisor. For gVisor, check the platform. The docs name ptrace, systrap and KVM, and say ptrace is no longer supported.

Providers using each

List price per vCPU-hour

Related terms

All glossary terms

Related