bwrap

package
v0.0.0-...-3476652 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 19 Imported by: 0

Documentation

Overview

Package bwrap implements a bubblewrap-compatible command line for running commands in a gVisor sandbox.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapOp

type CapOp struct {
	Type CapOpType
	Cap  string
}

CapOp represents a capability operation.

type CapOpType

type CapOpType string

CapOpType represents the type of capability operation.

const (
	// CapOpDrop represents a capability drop operation.
	CapOpDrop CapOpType = "drop"
	// CapOpAdd represents a capability add operation.
	CapOpAdd CapOpType = "add"
)

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

Cli implements subcommands.Command for the "bwrap" command.

func (*Cli) Execute

func (c *Cli) Execute(ctx context.Context, f *flag.FlagSet, args ...any) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Cli) FetchSpec

func (c *Cli) FetchSpec(_ *config.Config, _ *flag.FlagSet) (string, *specs.Spec, error)

FetchSpec implements util.SubCommand.FetchSpec.

func (*Cli) Name

func (*Cli) Name() string

Name implements subcommands.Command.Name.

func (*Cli) SetFlags

func (c *Cli) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Cli) Synopsis

func (*Cli) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Cli) Usage

func (*Cli) Usage() string

Usage implements subcommands.Command.Usage.

type HostDir

type HostDir struct {
	// Dest is the sandbox path, as given on the command line.
	Dest string
	// Path is the host path behind Dest.
	Path string
	// ReadOnly reports whether the bind mount behind Dest is read-only.
	ReadOnly bool
	// Perms is the mode of the directory, from --perms or defaultDirPerms.
	Perms uint32
}

HostDir is a --dir that a bind mount backs, so it is created on the host rather than mounted as a tmpfs.

Jump to

Keyboard shortcuts

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