Application Kernel for Containers - modified to work in Windows wsl with full CUDA support
  • Go 76.1%
  • C++ 18.1%
  • Starlark 3.2%
  • Assembly 0.6%
  • Shell 0.5%
  • Other 1.3%
Find a file
gVisor bot d345f7da26 Merge pull request #15929 from tamird:qemu-prebuilt-user
PiperOrigin-RevId: 1009196000
2026-10-28 15:02:18 -07:00
.agents/skills Merge pull request #16046 from EtiennePerot:agents-modernize 2026-10-21 17:07:48 -07:00
.buildkite Cap startup benchmark iterations in Buildkite. 2026-10-27 23:31:05 +00:00
.gemini Add a gVisor review style guide for Gemini Code Assist. 2026-10-12 19:54:53 -07:00
.github Check Go import groups with goimports 2026-10-22 06:10:27 -04:00
.vscode make clangd work out of the box 2026-07-28 17:28:28 -07:00
debian runsc symbolize: Delegate symbolization to sentry binary 2026-09-16 15:11:47 -07:00
examples Merge pull request #15769 from tamird:sandboxexec-example-network-tests 2026-10-25 02:40:51 -07:00
external/tools/plugin-stack Clone dpdk from github 2025-04-24 09:34:47 -07:00
g3doc runsc/bwrap: Support --dev in bwrap personality 2026-10-27 11:05:09 -07:00
governance Use rules_qemu for cross-architecture generators 2026-10-27 14:52:07 -04:00
images Merge pull request #16498 from tamird:fix/remove-obsolete-basic-ruby 2026-10-28 11:34:40 -07:00
pkg Merge pull request #15929 from tamird:qemu-prebuilt-user 2026-10-28 15:02:18 -07:00
runsc Prime core scheduling cookie creation during runsc initialization. 2026-10-28 01:50:36 -07:00
sandboxexec runsc/bwrap: Support --as-pid-1 in bwrap personality 2026-10-26 16:03:56 -07:00
shim Check Go import groups with goimports 2026-10-22 06:10:27 -04:00
test Merge pull request #16253 from tamird:fix/http-readiness-cancellation 2026-10-28 11:25:42 -07:00
tools Merge pull request #15929 from tamird:qemu-prebuilt-user 2026-10-28 15:02:18 -07:00
vdso Load Bazel 9 rules explicitly 2026-09-28 17:47:18 -07:00
webhook Automated rollback of changelist 996655289 2026-10-09 16:09:43 -07:00
website document sandboxes without a root container 2026-10-26 22:50:01 +00:00
.bazelignore Ignore convenience symlink. 2021-02-01 20:30:16 +00:00
.bazelrc Merge pull request #15371 from tamird:arm64-page-size-setting 2026-10-13 09:11:57 -07:00
.bazelversion Merge pull request #11935 from konstantin-s-bogom:master 2025-08-20 14:31:33 -07:00
.clang-format Fix outstanding lint failures. 2026-09-18 01:40:02 -07:00
.clang-tidy Export Benchmark's public umbrella headers 2026-10-25 13:21:16 -04:00
.clangd make clangd work out of the box 2026-07-28 17:28:28 -07:00
.devcontainer.json make clangd work out of the box 2026-07-28 17:28:28 -07:00
.gitignore make clangd work out of the box 2026-07-28 17:28:28 -07:00
ADOPTERS.md Add Snowflake to gvisor adopters. 2026-09-29 15:14:11 -07:00
AGENTS.md Merge pull request #16046 from EtiennePerot:agents-modernize 2026-10-21 17:07:48 -07:00
AUTHORS Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
BUILD Prime core scheduling cookie creation during runsc initialization. 2026-10-28 01:50:36 -07:00
CODE_OF_CONDUCT.md Merge pull request #2513 from amscanne:website-integrated 2020-05-12 12:55:23 -07:00
CODEOWNERS Refactor gofer related packages. 2026-10-26 12:52:38 -07:00
CONTRIBUTING.md Modernize agent guidance. 2026-10-20 17:35:56 -07:00
go.mod Update Go to 1.27.3 2026-10-21 20:36:05 -04:00
go.sum Adds per-author rate-limiting to the Buildkite coordinator. 2026-10-20 16:30:03 -07:00
GOVERNANCE.md Remove references to the Gitter chat room. 2026-09-30 22:54:36 +00:00
LICENSE Add BSD-style license to list of licenses 2025-08-06 18:46:54 -07:00
MAINTAINERS.md Update maintainers list 2026-10-06 11:32:31 -07:00
Makefile Sandbox security posture test: Verify core tags. 2026-10-27 20:08:58 -07:00
MODULE.bazel Use rules_qemu for cross-architecture generators 2026-10-27 14:52:07 -04:00
nogo.yaml Enable deprecation diagnostics for repository code 2026-10-23 11:41:27 -04:00
README.md Add the gVisor release policy and process. 2026-10-11 10:13:06 +00:00
SECURITY.md Clarify that experimental features are out of scope for CVEs. 2026-10-20 16:24:01 -07:00

gVisor

Build status Issue reviver CodeQL code search

What is gVisor?

gVisor provides a strong layer of isolation between running applications and the host operating system. It is an application kernel that implements a Linux-like interface. Unlike Linux, it is written in a memory-safe language (Go) and runs in userspace.

gVisor includes an Open Container Initiative (OCI) runtime called runsc that makes it easy to work with existing container tooling. The runsc runtime integrates with Docker and Kubernetes, making it simple to run sandboxed containers.

What isn't gVisor?

  • gVisor is not a syscall filter (e.g. seccomp-bpf), nor a wrapper over Linux isolation primitives (e.g. firejail, AppArmor, etc.).
  • gVisor is also not a VM in the everyday sense of the term (e.g. VirtualBox, QEMU).

gVisor takes a distinct third approach, providing many security benefits of VMs while maintaining the lower resource footprint, fast startup, and flexibility of regular userspace applications.

Why does gVisor exist?

Containers are not a sandbox. While containers have revolutionized how we develop, package, and deploy applications, using them to run untrusted or potentially malicious code without additional isolation is not a good idea. While using a single, shared kernel allows for efficiency and performance gains, it also means that container escape is possible with a single vulnerability.

gVisor is an application kernel for containers. It limits the host kernel surface accessible to the application while still giving the application access to all the features it expects. Unlike most kernels, gVisor does not assume or require a fixed set of physical resources; instead, it leverages existing host kernel functionality and runs as a normal process. In other words, gVisor implements Linux by way of Linux.

gVisor should not be confused with technologies and tools to harden containers against external threats, provide additional integrity checks, or limit the scope of access for a service. One should always be careful about what data is made available to a container.

Documentation

User documentation and technical architecture, including quick start guides, can be found at gvisor.dev.

Installing from source

gVisor builds on x86_64 and ARM64. Other architectures may become available in the future.

For the purposes of these instructions, bazel and other build dependencies are wrapped in a build container. It is possible to use bazel directly, or type make help for standard targets.

Requirements

Make sure the following dependencies are installed:

Building

Build a release tarball containing runsc, the containerd-shim-runsc-v1 containerd shim, and a few sidecar binaries that runsc expects to find in a gvisor-bin/ directory next to itself, then extract it to /usr/local/bin:

make release-tarball DESTINATION=bin/
sudo tar -C /usr/local/bin -xf bin/gvisor.tar.bz2

To build specific libraries or binaries, you can specify the target:

make build TARGETS="//pkg/tcpip:tcpip"

Building directly with Bazel (without Docker)

Using Bazel directly isn't recommended due to the extra overhead, but in order to get started:

  • Look at the build dockerfile for the canonical list of needed dependencies.
  • Install and use bazelisk. Otherwise, make sure your bazel version matches the one listed in the .bazelversion file.

After setting up dependencies, using Bazel is similar to the Makefile:

bazel build -c opt //debian:gvisor-release-tar-bz2

Testing

To run standard test suites, you can use:

make unit-tests
make tests

To run specific tests, you can specify the target:

# Makefile
make test TARGETS="//runsc:version_test"
# Bazel
bazel test //runsc:version_test

Mac OS

Some packages support running tests directly on macOS. At the time of this writing, gVisor requires bazel 8, which you can install via homebrew:

brew install bazel@8

# You can then run the tests, e.g.:
$(brew --prefix bazel@8)/bin/bazel test --macos_sdk_version=$(xcrun --show-sdk-version) -- //tools/nogo/... //tools/check{aligned,const,escape,linkname,locks,unsafe}/...

Using go get

This project uses bazel to build and manage dependencies. A synthetic go branch is maintained that is compatible with standard go tooling for convenience. This is useful for external packages and libraries that depend on gVisor subpackages (e.g. userspace networking via Netstack) to import gVisor Go code into their Go projects.

Select this branch explicitly with the go branch query. @latest resolves master, which requires Bazel and is not compatible with standard Go tooling:

go get gvisor.dev/gvisor/pkg/tcpip/transport/tcp@go

NOTE: runsc builds from this branch are not supported. gVisor and runsc require several binaries (some of which are not even written in Go) in order to function. The go branch is supported in a best effort capacity, and direct development on this branch is not supported. Development should occur on the master branch, which is then reflected into the go branch.

Community & Governance

See GOVERNANCE.md for project governance information.

See ADOPTERS.md for a list of known production users and adopters.

The gvisor-users mailing list and gvisor-dev mailing list are good starting points for questions and discussion.

Security Policy

See SECURITY.md.

Releases

See Releases.

Contributing

See Contributing.md.