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

Function setupSpec

utils.go:71–83  ·  view source on GitHub ↗

setupSpec performs initial setup based on the cli.Context for the container

(context *cli.Context)

Source from the content-addressed store, hash-verified

69
70// setupSpec performs initial setup based on the cli.Context for the container
71func setupSpec(context *cli.Context) (*specs.Spec, error) {
72 bundle := context.String("bundle")
73 if bundle != "" {
74 if err := os.Chdir(bundle); err != nil {
75 return nil, err
76 }
77 }
78 spec, err := loadSpec(specConfig)
79 if err != nil {
80 return nil, err
81 }
82 return spec, nil
83}
84
85func revisePidFile(context *cli.Context) error {
86 pidFile := context.String("pid-file")

Callers 1

startContainerFunction · 0.85

Calls 2

loadSpecFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…