container

package
v0.9.261 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNC_BINARY   = "runc"
	RUNC_LOG_FILE = "runc.log"
)
View Source
const StateFile = "state.json"

Variables

View Source
var (
	Run    types.Run = run
	Manage types.Run = manage
)
View Source
var RUNC_LOG_DEBUG = log.Logger.GetLevel() <= zerolog.DebugLevel

Functions

func CheckBinary

func CheckBinary() types.Check

Checks if the runc binary is available

func CheckVersion

func CheckVersion() types.Check

CheckVersion checks the versions associated with the runc binary

func Cleanup added in v0.9.246

func Cleanup(details *daemon.Details) (err error)

func CreateContainerForRestore

func CreateContainerForRestore(next types.Restore) types.Restore

func GetContainerForDump

func GetContainerForDump(next types.Dump) types.Dump

func GetStdioFds

func GetStdioFds(pid int32) ([]string, error)

lifted from libcontainer -> getPipeFds

func LoadSpecFromBundle

func LoadSpecFromBundle(next types.Run) types.Run

LoadSpecFromBundle loads the spec from the bundle path, and sets it in the context

func LoadSpecFromBundleForRestore

func LoadSpecFromBundleForRestore(next types.Restore) types.Restore

LoadSpecFromBundleForRestore loads the spec from the bundle path, and sets it in the context

func Query

func Query(ctx context.Context, req *daemon.QueryReq) (*daemon.QueryResp, error)

func RestoreConsole added in v0.9.246

func RestoreConsole(next types.Restore) types.Restore

func RunHooksOnRestore

func RunHooksOnRestore(next types.Restore) types.Restore

Adds CRIU callback to run the prestart and create runtime hooks before the namespaces are setup during restore

func RuncLogMsgToString

func RuncLogMsgToString(b []byte) (string, error)

func SaveState

func SaveState(root string, id string, state *libcontainer.State) (err error)

func SetPIDForDump

func SetPIDForDump(next types.Dump) types.Dump

func UpdateStateOnRestore

func UpdateStateOnRestore(next types.Restore) types.Restore

UpdateStateOnRestore updates the container state after restore Without this, runc won't be able to 'detect' the container

Types

type RuncState

type RuncState struct {
	ID  string `json:"id"`
	PID int    `json:"pid"`
}

Jump to

Keyboard shortcuts

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