MCPcopy
hub / github.com/containers/toolbox / loadCDISpecFrom

Function loadCDISpecFrom

src/cmd/initContainer.go:978–993  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

976}
977
978func loadCDISpecFrom(path string) (*specs.Spec, error) {
979 data, err := os.ReadFile(path)
980 if err != nil {
981 return nil, err
982 }
983
984 spec, err := cdi.ParseSpec(data)
985 if err != nil {
986 return nil, err
987 }
988 if spec == nil {
989 return nil, errors.New("missing data")
990 }
991
992 return spec, nil
993}
994
995func mountBind(containerPath, source, flags string) error {
996 fi, err := os.Stat(source)

Callers 1

initContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…