gVisor with Docker: Sandbox Untrusted Containers with runsc (Linux, Windows, Mac)
Before you start
- 23 min read
Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#
gVisor is a free, open-source sandbox for containers: its runtime runsc gives each container its own small kernel written in Go, so an untrusted program talks to that kernel instead of your real Linux kernel. You switch it on per container with --runtime=runsc, or with runtime: runsc in Compose.
Logo: the official gVisor project (github.com/gvisor/gvisor, file website/assets/logos/logo_with_text_on_white.svg at tag release-20261130.0)
A normal container shares the host kernel, so a kernel bug can let a hostile program out. With gVisor that program meets gVisor's kernel first. That suits code you do not trust: a script a stranger sent, a build job, a plugin, an AI agent that runs code. It costs speed, mostly on file and network work, so you use it for the one risky service and keep databases and proxies on the normal runtime.
| What | Value (official sources, read 5 December 2026) |
|---|---|
| Current release | release-20261130.0, tagged 30 November 2026, published 2 December 2026. Releases come about weekly; point releases such as 20261123.2 exist |
| Install | runsc package from gVisor's apt repository (version 20261130.0, about 88 MB) or a tarball |
| Host | Linux only, x86_64 or ARM64, kernel 5.6 or newer, Docker 17.09.0 or newer |
| Time needed | About 30 minutes (our estimate, not measured) |
| Ports | None. gVisor has no web page |
| Licence | Apache-2.0 (LICENSE at the release tag) |
| Official docs | gvisor.dev/docs |
At a glance:
- What it is: a container runtime (
runsc) that plugs into Docker next to the normalrunc. - What it protects: the host kernel from programs inside the container (the docs say it limits kernel-bug exploits).
- What it does not do: it is not a virtual machine, does not stop hardware side channels and does not fix a bad design (see Security).
- What it costs: slower file and network work; some Linux features are missing (see "What gets slower and what breaks").
- Where it runs: Linux only. Windows and Mac readers run the same commands on a Linux server over
ssh. - Not a scanner or monitor: for those see our Trivy and Falco guides.
How it fits together#
You tell Docker to start one service with the runsc runtime. Inside, the program's system calls land in gVisor's Sentry, which handles them itself. File access goes through a helper called the Gofer, and only a small, filtered set of calls reaches the host kernel.
Drawn for this guide from the official docs. The dashed box is the normal runtime, with no sandbox.
Four words: runsc is the runtime program. The Sentry is gVisor's own kernel. The Gofer is the file helper that runs as a separate process. A platform is how gVisor catches system calls; the default is systrap, which needs no special hardware.
Before you start#
Note: every host name, user name and address on this page is a dummy example (like
<your-server>orapp.example.com). Replace it with your own and keep real secrets out of Git.
| System | What to have |
|---|---|
| Linux (required) | 64-bit Linux, x86_64 or ARM64, kernel 5.6+, Docker Engine and the Compose plugin, sudo rights. The apt route is for Debian and Ubuntu |
| Windows | PowerShell with ssh (built in) to reach a Linux server. Docker Desktop is not used |
| Mac | Terminal with ssh (built in) to reach a Linux server. Docker Desktop is not used |
The gVisor docs say "Today, gVisor requires Linux" and they do not describe Windows, WSL 2 or Docker Desktop. A feature request to make Docker Desktop easier is still open (issue 11238). We did not try WSL 2, so we give no recipe. A small Linux server or VM is the safe choice.
Checklist:
- [ ] You can log in to the Linux host and use
sudo - [ ]
uname -rshows 5.6 or newer (Step 1) - [ ]
docker --versionanddocker compose versionprint a version - [ ] You can restart Docker for a minute (it stops running containers unless
live-restoreis on) - [ ] You know which ONE service you want to sandbox
Tested by DIY Lab Hub: not yet. Nothing was run on a real machine. Commands come from the official docs and the source at release-20261130.0, read on 5 December 2026.
Tip: gVisor's own production guide says it "should generally not be used to sandbox every application". Start with the one service that touches untrusted input.
LLM Guide: let your AI assistant set it up#
Prefer to let an AI do the typing? Copy the block below into ChatGPT, Claude, Gemini or a local model. It first asks about your setup (Linux host, Docker, which service to sandbox, web page or not), then follows only the path that fits you. It uses the same pinned release as this guide. You still read each command before you run it.
You are my assistant for installing gVisor (runsc, a sandbox runtime for Docker containers) release-20261130.0 and sandboxing ONE container with it.
Follow the DIY Lab Hub guide https://diylabhub.com/gvisor/ (checked 5 December 2026).
Work one step at a time. Before each command, say in one line what it does. Wait for my OK before anything that restarts Docker (it stops running containers unless live-restore is on), deletes data, or opens a port.
STEP 0 - FIND OUT MY SETUP. Ask me these questions (or have me run the read-only checks) before you do anything else:
1. gVisor runs on Linux only. Which machine is the Linux host (x86_64 or ARM64, Debian/Ubuntu or another distribution)? If I use Windows or Mac, I reach the Linux server with ssh <your-user>@<your-server> and run everything there. Docker Desktop and WSL 2 are not covered.
2. Kernel and Docker. Check: uname -r (must be 5.6 or newer), uname -m, docker --version, docker compose version. Do I have sudo rights?
3. Can Docker be restarted for a minute right now? Does it have live-restore on?
4. Which ONE service do I want to sandbox (untrusted code, a build job, a plugin, an AI agent that runs code)? Does it need a network, or a web page? Databases and proxies stay on the normal runtime.
5. Do I already run a reverse proxy: Traefik, Caddy, nginx / Nginx Proxy Manager, or none? Only matters if the sandboxed service has a web page.
6. HTTPS for that web page: public domain, home only, or none?
THEN FOLLOW THE MATCHING PATH:
- Kernel below 5.6 or not Linux: stop and tell me; do not try workarounds.
- Debian or Ubuntu: install from gVisor's apt repository and pin it:
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL https://gvisor.dev/archive.key | sudo gpg --dearmor -o /usr/share/keyrings/gvisor-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gvisor-archive-keyring.gpg] https://storage.googleapis.com/gvisor/releases release main" | sudo tee /etc/apt/sources.list.d/gvisor.list > /dev/null
sudo apt-get update && sudo apt-get install -y runsc=20261130.0
sudo apt-mark hold runsc
- Other Linux (tarball, needs zstd): download https://storage.googleapis.com/gvisor/releases/release/20261130/$(uname -m)/gvisor.tar.zstd and its .sha512, run sha512sum -c, then sudo tar --zstd -xf gvisor.tar.zstd -C /usr/local/bin. Keep the gvisor-bin/ folder next to runsc, then sudo chmod a+rx /usr/local/bin/runsc /usr/local/bin/gvisor-bin /usr/local/bin/gvisor-bin/*
- Register the runtime: cat /etc/docker/daemon.json, then sudo runsc install (run from the real runsc location, not a download folder), then ask me, then sudo systemctl restart docker, then docker info | grep -i runtimes.
- Sandbox with Compose (no web page): use the file below. Give the service a network only when it needs one: the default Compose network breaks DNS inside a sandbox; the official workarounds are network_mode: bridge with a dns: entry, a mounted resolv.conf, or plain IP addresses.
- Sandboxed web service behind Traefik v3 (external "proxy" network; docker network create proxy if missing): replace network_mode: none with "networks: - proxy" and add labels (the domain is an example):
traefik.enable=true
traefik.http.routers.sandboxed-app.rule=Host(`app.example.com`)
traefik.http.routers.sandboxed-app.entrypoints=https
traefik.http.routers.sandboxed-app.tls=true
traefik.http.routers.sandboxed-app.tls.certresolver=le
traefik.http.services.sandboxed-app.loadbalancer.server.port=8080
Tell me the guide did not test this combination.
- Sandboxed web service, no Traefik: publish ports: ["127.0.0.1:8080:8080"] and use Caddy 2.11.9 as in the guide: Caddyfile
app.example.com {
reverse_proxy localhost:8080
}
Public domain = automatic Let's Encrypt (DNS record to the server, ports 80 and 443 open). Home only = "tls internal" inside the block and trust Caddy's root certificate on each device.
THE COMPOSE FILE (folder ~/docker_volumes/gvisor on the Linux host, file compose.yaml; keep this exact version):
services:
untrusted:
image: ubuntu:24.04
container_name: untrusted
runtime: runsc
network_mode: none
command: ["sleep", "infinity"]
restart: unless-stopped
volumes:
- ./data:/work
Create the folders first: mkdir -p ~/docker_volumes/gvisor/{data,config,logs,backups}
Start it: docker compose config -q then docker compose up -d then docker compose ps
Optional: add mem_limit and cpus to the service (not tested with runsc by the guide).
CHECK IT WORKED: runsc --version prints runsc version release-20261130.0. docker info | grep -i runtimes lists runsc next to runc. docker run --rm --runtime=runsc hello-world:linux works, and docker run --rm --runtime=runsc ubuntu:24.04 dmesg prints gVisor boot lines starting "Starting gVisor..." (this only shows the runtime is on; an attacker can fake it, so it is not a security test). docker inspect --format '{{.HostConfig.Runtime}}' untrusted prints runsc (a service I forgot to switch prints runc). If you see fork/exec /proc/self/exe: invalid argument, check the kernel version and the chmod line above.
RULES FOR YOU:
- Use only release-20261130.0 and the settings above. Do not use :latest, do not sandbox every container (only the one risky service), and do not invent options. If a step fails, show me the exact error and read https://gvisor.dev/docs/ before guessing.
- Never mount /var/run/docker.sock into a sandboxed container. Never give it a network unless it needs one. Keep runsc and gvisor-bin owned by root. Do not expose any port to the internet except HTTPS through the proxy.
- Values like <your-user>, <your-server> and app.example.com are examples; ask me for mine.
- Never ask me to paste passwords, tokens or keys into this chat.
Step 1: Check the kernel and Docker#
The install page says gVisor "requires Linux 5.6+".
Linux#
uname -r uname -m docker --version docker compose version
Windows (PowerShell)#
ssh <your-user>@<your-server>
Then run the Linux commands above inside that session. <your-user>@<your-server> is a dummy: use your own login and server.
Mac (Terminal)#
Same commands as Linux, after ssh <your-user>@<your-server>.
Check it worked. The kernel number is 5.6 or higher, uname -m says x86_64 or aarch64, and both Docker commands print a version.
Tip: A kernel below 5.6 is the first thing to rule out when you see
fork/exec /proc/self/exe: invalid argumentlater (see Common mistakes).
Step 2: Install runsc#
The docs call the apt repository "most future-proof". The apt repository serves 20261130.0 on our check, and the package can be pinned.
Linux#
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg curl -fsSL https://gvisor.dev/archive.key | sudo gpg --dearmor -o /usr/share/keyrings/gvisor-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gvisor-archive-keyring.gpg] https://storage.googleapis.com/gvisor/releases release main" | sudo tee /etc/apt/sources.list.d/gvisor.list > /dev/null sudo apt-get update && sudo apt-get install -y runsc=20261130.0 sudo apt-mark hold runsc
runsc=20261130.0 pins the version, and apt-mark hold stops a routine apt upgrade from moving it (see Updates). Without a pin you get whatever release is newest.
Not on Debian or Ubuntu? The docs give a tarball route. The 20261130 in the URL is the release date. It needs zstd installed:
(
set -e
ARCH=$(uname -m)
URL=https://storage.googleapis.com/gvisor/releases/release/20261130/${ARCH}
wget ${URL}/gvisor.tar.zstd ${URL}/gvisor.tar.zstd.sha512
sha512sum -c gvisor.tar.zstd.sha512
sudo tar --zstd -xf gvisor.tar.zstd -C /usr/local/bin
rm -f gvisor.tar.zstd gvisor.tar.zstd.sha512
)
The tarball holds runsc, containerd-shim-runsc-v1 and a gvisor-bin/ folder. Keep gvisor-bin/ next to runsc and make both readable and executable for all users. Older guides that download only the runsc file are out of date.
Windows (PowerShell)#
Run the Linux commands inside your ssh <your-user>@<your-server> session.
Mac (Terminal)#
Same commands as Linux, inside your ssh session.
Check it worked. runsc --version prints runsc version release-20261130.0. We did not run it, so that line is the shape from the docs, not our output.
Tip: After the tarball route, run
sudo chmod a+rx /usr/local/bin/runsc /usr/local/bin/gvisor-bin /usr/local/bin/gvisor-bin/*. The official FAQ gives this for the errorfork/exec /proc/self/exe: invalid argument.
Step 3: Register runsc as a Docker runtime#
The docs say the apt package configures Docker for you when Docker is already installed. Check it, and add the entry yourself if it is missing.
Linux#
cat /etc/docker/daemon.json sudo runsc install sudo systemctl restart docker docker info | grep -i runtimes
runsc install reads /etc/docker/daemon.json, keeps your other settings and adds the runtime named runsc with the path of the runsc program you ran (source at the tag). The result looks like this:
{
"runtimes": {
"runsc": {
"path": "/usr/bin/runsc"
}
}
}
The path depends on where runsc lives (/usr/bin for apt, /usr/local/bin for the tarball). A restart stops running containers unless live-restore is on. gVisor's Docker page says "restart"; Docker's own docs list runtimes among the options that systemctl reload docker can apply without a restart. We did not test either.
Windows (PowerShell)#
Run the Linux commands inside your ssh session.
Mac (Terminal)#
Same commands as Linux, inside your ssh session.
Check it worked. The docker info line lists runsc next to runc.
Tip: Run
sudo runsc installfrom the realrunsclocation, not from a download folder. The runtime path is written from the program you ran, and a temp folder that disappears breaks every sandbox.
Step 4: Run a container in the sandbox and check it#
Linux#
docker run --rm --runtime=runsc hello-world:linux docker run --rm --runtime=runsc ubuntu:24.04 dmesg
Windows (PowerShell)#
Run the Linux commands inside your ssh session.
Mac (Terminal)#
Same commands as Linux, inside your ssh session.
Check it worked. The second command prints a few made-up boot lines. The docs show output that starts like this (the funny wording changes between releases; we did not run it):
[ 0.000000] Starting gVisor... [ 0.354495] Daemonizing children...
The official page warns that an attacker can fake this output. Use dmesg to see that the runtime is on, never as a security test.
Tip:
docker inspect --format '{{.HostConfig.Runtime}}' <container>prints the runtime a container really uses. A container you forgot to switch printsrunc.
Step 5: Sandbox one service in Compose#
The Compose spec has a runtime field per service. Only that service goes into the sandbox. Everything else in the file stays on runc. Data goes under ~/docker_volumes/gvisor; ./data is the only host folder the sandbox sees.
Linux#
mkdir -p ~/docker_volumes/gvisor/{data,config,logs,backups}
cd ~/docker_volumes/gvisor
cat > compose.yaml << 'EOF'
services:
untrusted:
image: ubuntu:24.04
container_name: untrusted
runtime: runsc
network_mode: none
command: ["sleep", "infinity"]
restart: unless-stopped
volumes:
- ./data:/work
EOF
docker compose config -q
docker compose up -d
docker compose ps
network_mode: none gives the service no network at all, the safest start for code you do not trust. The file has no version: line, which Compose no longer needs.
Windows (PowerShell)#
Run the Linux commands inside your ssh session. The files live on the server, in ~/docker_volumes/gvisor.
Mac (Terminal)#
Same commands as Linux, inside your ssh session.
Check it worked. docker compose ps shows untrusted running, docker compose exec untrusted dmesg prints the gVisor lines and docker inspect --format '{{.HostConfig.Runtime}}' untrusted prints runsc.
Give the service a network only when it needs one. gVisor's FAQ warns that the default Compose network breaks DNS inside a sandbox, because Docker's DNS helper at 127.0.0.11 is not reachable there (issue 7469 is open). The official workarounds are: network_mode: bridge, a mounted resolv.conf that points to a resolver the container can reach, or plain IP addresses instead of container names. gVisor's own Compose example uses network_mode: bridge with a dns: entry such as dns: ["<your-dns-server-ip>"].
Tip: Add Docker's normal limits as well, for example
mem_limitandcpuson the service. The docs say gVisor cannot enforce limits between processes inside one sandbox, and tell you to limit the sandbox from outside with a host cgroup. We did not test these limits withrunsc.
What gets slower and what breaks#
Both lists come from the official performance, production and compatibility pages. The docs' benchmark numbers come from old hardware (Debian 9, kernel 4.19, ptrace platform), so we quote none.
| What | The docs say |
|---|---|
| CPU-heavy work | Minimal or no overhead (API servers, data pipelines, training) |
| File I/O | The most affected part; databases are the typical poor case |
| Network | The second most affected part; gVisor has its own network stack. Load balancers and simple web servers suffer |
| Start-up | Mostly Docker's own time, not gVisor's |
| Does not work or differs | Detail |
|---|---|
io_uring | Off by default; basic operations only when enabled. Most programs fall back to other calls |
| Block-device filesystems | You cannot mount ext4 or similar inside the sandbox. Mount them on the host and share the folder |
iptables and nftables | Only partly supported |
| Custom hardware devices | Not supported, except NVIDIA GPUs and TPUs (GPU needs the --nvproxy flag; we do not cover it) |
| Resource limits | Not enforced between processes inside one sandbox |
| KVM inside the sandbox | Not supported |
| DNS on user-defined bridge networks | Fails, including the Compose default network (see Step 5) |
docker cp | The new file may not show at once, because gVisor caches directories (FAQ) |
| SELinux labels | Not supported; use --security-opt label=disable on that container (FAQ) |
| Writes to the container's own root filesystem | Kept in an overlay by default; use volumes for data you keep |
gVisor's docs say plainly: "the only real way to know if it will work is to try". Its Compose tutorial sandboxes a web front end and leaves the database on the normal runtime, because of the I/O cost.
Put it behind HTTPS with Traefik? Only for a web service you sandbox#
gVisor itself serves no web page and publishes no port. The only case for HTTPS is a service you decide to run inside the sandbox that has a web page. The proxy stays on the normal runtime outside. We did not test this combination; the Docker network is set up outside the sandbox, so incoming traffic should work, and only DNS lookups from inside are affected. This is for a server with a domain; local-only users can skip it.
With Traefik#
Replace network_mode: none with the proxy network and add labels (app.example.com is a dummy domain). Create the network once with docker network create proxy. Our Traefik guide covers the proxy itself.
services:
untrusted:
image: <your-web-image>:<pinned-tag>
runtime: runsc
restart: unless-stopped
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.sandboxed-app.rule=Host(`app.example.com`)
- traefik.http.routers.sandboxed-app.entrypoints=https
- traefik.http.routers.sandboxed-app.tls=true
- traefik.http.routers.sandboxed-app.tls.certresolver=le
- traefik.http.services.sandboxed-app.loadbalancer.server.port=8080
networks:
proxy:
external: true
Without Traefik: Caddy#
Publish the port on localhost only (ports: ["127.0.0.1:8080:8080"]) and let Caddy handle HTTPS. gVisor's Docker page shows -p port publishing working with runsc. Caddyfile:
app.example.com {
reverse_proxy localhost:8080
}
Caddy gets a Let's Encrypt certificate for a public domain. At home with no public domain, add tls internal inside the block for Caddy's own local certificate. See our Caddy guide. Check with curl -I https://app.example.com.
Security and testing#
| Control | How |
|---|---|
| What gVisor adds | A second wall: the app meets the Sentry, not the host kernel. The docs: "No system call is passed through directly to the host" |
| What it does not stop | Hardware side channels (keep kernel and firmware updated), resource exhaustion (use host cgroups), and an exposed service on the host. The docs: "A sandbox is not a substitute for a secure architecture" |
| Not a VM | The README says gVisor is neither a syscall filter nor a VM |
| Docker socket | Never mount /var/run/docker.sock into a sandboxed container. See our socket proxy guide |
| Network | network_mode: none unless needed. The docs say network policy belongs at the container level |
| Runtime path | Keep runsc and gvisor-bin/ owned by root. Anyone who can change them controls your sandboxes |
| GPU | nvproxy passes calls to the host driver. The docs say gVisor is "much less effective" against bugs in the NVIDIA driver itself |
Quick tests:
runsc --version
docker info | grep -i runtimes
docker run --rm --runtime=runsc ubuntu:24.04 dmesg | head -3
docker inspect --format '{{.HostConfig.Runtime}}' untrusted
Do the host audit too: our Docker Bench for Security guide checks the Docker host. For event alerts see our Falco guide. gVisor has its own Falco tutorial that starts Falco on the host with extra gVisor flags; that is different from the Docker-based setup in our guide, and we did not try it.
Common mistakes#
| Mistake | Why it happens | Do this instead |
|---|---|---|
docker: Error response from daemon: unknown or invalid runtime name: runsc. (RAGFlow issue 8428) | The runtime is not registered, or Docker was not restarted | Check /etc/docker/daemon.json, run sudo runsc install, restart Docker, then run docker info and look for runsc |
OCI runtime create failed: ... cannot create gofer process: gofer: fork/exec /proc/self/exe: invalid argument: unknown (same RAGFlow issue) | The FAQ blames permissions on runsc and gvisor-bin/. The reporter's kernel was 3.10, far below 5.6 (the issue does not confirm the cause) | Run chmod a+rx from Step 2 and check uname -r is 5.6 or newer |
cannot create sandbox: cannot read client sync file: waiting for sandbox to start: EOF and no other hint | A generic "the sandbox died at start". Issue 9996 was a release that crashed with SIGILL on one CPU type (the fix was merged on 13 February 2024); other reporters had other causes | Add a debug runtime (Troubleshooting) and read the log. The real cause is in the log, not in EOF |
Upgrading to a new weekly release without a test: FATAL ERROR: Error setting up root FS: self-bind-mounting rootfs "/var/run/docker/..." (issue 13238) | release-20260520.0 broke hosts where /var/run is a link to /run; the fix, PR 13240, was merged on 22 May 2026 | Pin the version, try a new release on a spare host first, keep the last good package |
| Using it with rootless Docker | Issue 12575 is open: runsc failed with the EOF error; the reporter's workaround needed a TESTONLY flag. A fix (PR 14578) is open | Use normal, rootful Docker for runsc. Do not copy the TESTONLY flag |
Compose service cannot find another container or the internet: bad address 'container-name' | Docker's DNS helper at 127.0.0.11 is unreachable in the sandbox (issue 7469) | Use one of the three official workarounds in Step 5 |
Running gVisor inside another container: cannot set up cgroup for root: configuring cgroup: write /sys/fs/cgroup/cgroup.subtree_control: device or resource busy (safe-code-execution issue 2) | The reporter needed a privileged container and nested cgroups, which weakens the isolation | Run runsc on the host, not inside a container |
Treating dmesg output as proof of safety | The docs say an attacker can easily fake it | Use it only to see which runtime started |
| Sandboxing the database too | File I/O is the biggest cost, and the docs say a sandbox gives little for a trusted database, because the data is already inside it | Sandbox the front-facing or untrusted service, not the database |
AI assistants: "download the runsc file, chmod +x it, then runsc install" | That was the way before July 2026. Releases now come with a gvisor-bin/ folder next to runsc; the docs scheduled the old auto-download for removal at the end of September 2026 | Use the apt package or the tarball (Step 2) |
AI assistants: --runtime=gvisor, a runtime name that does not exist, or "gVisor gives you VM-level isolation" | The default name is runsc; the docs say gVisor is not a VM | Use runsc. Treat gVisor as one extra layer |
Tip: After every change to
daemon.json, restart Docker and rundocker info | grep -i runtimes. A typo in that JSON file stops Docker itself from starting, so keep a copy first (Updates and backups).
Troubleshooting#
| Problem | Solution |
|---|---|
Docker will not start after editing daemon.json | sudo journalctl -u docker --since "10 min ago"; put your backup copy back |
runsc not found | which runsc; for the tarball route use the full path /usr/local/bin/runsc |
A program works with runc but not runsc | Read the debug log (below). The cause is usually a missing Linux feature |
SELinux is not supported: system_u:system_r:container_t:s0:... | Add --security-opt label=disable for that container (FAQ) |
| Container started but is slow | Check the "What gets slower" table; consider the KVM platform on bare metal only |
| Want to remove gVisor | sudo runsc uninstall removes the runsc entry from daemon.json (command in the source at the tag), then restart Docker |
Debug runtime#
The docs show a second runtime with logging. Create it, restart Docker and run the failing container with it:
sudo runsc install --runtime runsc-debug -- --debug --debug-log=/tmp/runsc-debug/ --strace sudo systemctl restart docker docker run --rm --runtime=runsc-debug ubuntu:24.04 dmesg ls /tmp/runsc-debug/
The log ending .create often explains a start failure; the one ending .boot holds the traced system calls. The docs say to turn SELinux off while debugging. These logs can contain your data, so delete them afterwards and do not post them in public.
Exact error texts#
cannot create sandbox: cannot read client sync file: waiting for sandbox to start: EOF(issue 9996): the sandbox died during start-up. Read the debug log.open /run/containerd/.../<containerid>/log.json: no such file or directory(official FAQ): the host is too old (nomemfd_create). Upgrade the kernel.- The other texts are in the Common mistakes table above.
Known bugs (open, December 2026)#
Issue 12575: rootless Docker; a fix is proposed, not merged on 5 December 2026. Issue 7469: DNS on Docker user-defined networks. Issue 11238: no easy path for Docker Desktop. We found nothing that stops a normal rootful install on a current Linux host.
Updates and backups#
Update gVisor. Releases are weekly, so read the release notes before a move. Try the new version on a spare host first, then:
sudo apt-mark unhold runsc sudo apt-get update && sudo apt-get install -y runsc=<new-version> sudo apt-mark hold runsc sudo systemctl restart docker cd ~/docker_volumes/gvisor && docker compose up -d --force-recreate
The package install may re-register the runtime on its own. --force-recreate makes the sandboxed containers start again with the new runsc (we did not test whether running sandboxes keep the old one).
What to back up. compose.yaml, the data folder and a copy of /etc/docker/daemon.json. The restore point matters more than the data, because a bad daemon.json stops Docker.
Linux and Mac#
Save as ~/docker_volumes/gvisor/backup.sh (on the Linux server; a Mac simply reaches it by ssh):
#!/usr/bin/env bash set -euo pipefail base="$HOME/docker_volumes/gvisor" cp /etc/docker/daemon.json "$base/config/daemon.json.copy" out="$base/backups/gvisor-$(date +%F).tar.gz" tar -czf "$out" -C "$base" compose.yaml config data chmod 600 "$out"
Run chmod 700 on it and add this line with crontab -e:
0 3 * * * /home/<your-user>/docker_volumes/gvisor/backup.sh
Windows (PowerShell)#
The server makes the backup with the cron job above. Fetch a copy to your PC:
scp "<your-user>@<your-server>:docker_volumes/gvisor/backups/gvisor-<date>.tar.gz" .
Restore test#
Unpack the archive into a spare folder and check that it holds what you need:
mkdir -p /tmp/gvisor-restore && tar -xzf gvisor-<date>.tar.gz -C /tmp/gvisor-restore cat /tmp/gvisor-restore/config/daemon.json.copy docker compose -f /tmp/gvisor-restore/compose.yaml config -q
The copy shows your runsc entry and config -q prints nothing when the file is fine.
Performance and resources#
The docs give no minimum RAM or CPU, and we measured none. They only say the Sentry needs additional memory and that system calls cross an extra layer. The runsc apt package is about 88 MB to download. Compare a normal and a sandboxed run of YOUR workload with docker stats and your own timing. The docs name two ways to trade safety for speed: the KVM platform (best on bare metal; in a VM they recommend the default systrap) and network passthrough with --network=host in runtimeArgs, which "decreases the isolation to the host". Neither is needed to start. To try KVM, add "runtimeArgs": ["--platform=kvm"] to a second runtime entry such as runsc-kvm, as the platform page shows.
FAQ#
Is gVisor a virtual machine? No. The README says it is neither a syscall filter nor a VM. It is a user-space kernel that stands between the program and your host kernel.
Can I run it on Windows or Mac? Not directly. gVisor needs Linux. Run it on a Linux server and reach it with ssh. The docs do not cover Docker Desktop or WSL 2.
Will all my containers work? Most do. The docs test the common language runtimes (Python, Java, Node.js, PHP, Go). Anything that needs a missing feature fails; see the table above.
Does it work with Podman or Kubernetes? The docs have quick starts for containerd, CRI-O, Kubernetes and OCI, and the rootless page names Podman. We only covered Docker. See our Podman guide for that engine and the Kubernetes intro for clusters.
Should I sandbox everything? No. The docs say it should generally not be used for every application; pick the risky services.
Sources#
- gVisor docs, read 5 December 2026: Installation, Docker Quick Start, Platforms, Production guide, Compatibility, FAQ, Debugging, Networking, GPU, Rootless, Security model, Performance, Compose tutorial, Falco tutorial
- Repository and release: gvisor/gvisor (moved from google/gvisor; the old address redirects), release-20261130.0 (published 2 December 2026), LICENSE (Apache-2.0), runsc install source, apt repository index
- Docker docs: dockerd configuration (runtimes, reload), live restore; Compose spec:
runtime - Issues read: RAGFlow 8428, gVisor 7469, 9996, 11238, 12575, 13238, safe-code-execution 2
Checked against the official docs on 2026-12-05. Nothing was run on a real machine by DIY Lab Hub; the commands come from the docs, the source and the issues above.