MCPcopy
hub / github.com/opencontainers/runc / getContainer

Function getContainer

utils_linux.go:31–38  ·  view source on GitHub ↗

getContainer returns the specified container instance by loading it from a state directory (root).

(context *cli.Context)

Source from the content-addressed store, hash-verified

29// getContainer returns the specified container instance by loading it from
30// a state directory (root).
31func getContainer(context *cli.Context) (*libcontainer.Container, error) {
32 id := context.Args().First()
33 if id == "" {
34 return nil, errEmptyID
35 }
36 root := context.GlobalString("root")
37 return libcontainer.Load(root, id)
38}
39
40func getDefaultImagePath() string {
41 cwd, err := os.Getwd()

Callers 10

start.goFile · 0.85
update.goFile · 0.85
delete.goFile · 0.85
execProcessFunction · 0.85
kill.goFile · 0.85
ps.goFile · 0.85
state.goFile · 0.85
checkpoint.goFile · 0.85
pause.goFile · 0.85
events.goFile · 0.85

Calls 1

LoadFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…