container

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package container runs a check in an OCI container through the command line of an engine such as docker or podman.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Engine string
	Image  string
	// Runtime is the OCI runtime name that the engine passes with --runtime. Empty means the default of the engine.
	Runtime string
	// Network is the engine network mode. The default none gives the check no network.
	Network string
	// User is the uid:gid of the check. The default is the uid and gid of the runner, so that the runner can delete what the
	// check wrote, and 65532:65532 when the runner is root.
	User      string
	Memory    string
	PidsLimit int
}

Config says how the container runs. Engine and Image are required.

type Sandbox

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

Sandbox is the engine-backed implementation.

func New

func New(cfg Config) (*Sandbox, error)

New returns a sandbox. It fills the defaults of cfg.

func (*Sandbox) Run

func (s *Sandbox) Run(ctx context.Context, spec sandbox.Spec) (sandbox.Outcome, error)

Jump to

Keyboard shortcuts

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