gvisor

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSpec

func CreateSpec(cfg ContainerConfig) (string, error)

CreateSpec builds an OCI runtime spec for running the container described by cfg under gVisor and returns it as a config.json string.

When the container is run with non-zero UID, it creates its own nested user namespace to work-around gVisor limitation: https://github.com/google/gvisor/issues/13564

func Exec

func Exec(args []string, env []string, terminal bool, paths *jailfs.Paths, cwdInSandbox string) error

Types

type ContainerConfig

type ContainerConfig struct {
	FsRootDst  string
	FsRootSrc  string
	Args       []string
	Env        []string
	Cwd        string
	UID        int
	GID        int
	Terminal   bool
	BindMounts []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL