MCPcopy Create free account
hub / github.com/containerd/nerdctl / groupAddFromNative

Function groupAddFromNative

pkg/inspecttypes/dockercompat/dockercompat.go:893–903  ·  view source on GitHub ↗
(sp *specs.Spec)

Source from the content-addressed store, hash-verified

891}
892
893func groupAddFromNative(sp *specs.Spec) ([]string, error) {
894 res := []string{}
895 if sp.Process != nil && sp.Process.User.AdditionalGids != nil {
896 for _, gid := range sp.Process.User.AdditionalGids {
897 if gid != 0 {
898 res = append(res, strconv.FormatUint(uint64(gid), 10))
899 }
900 }
901 }
902 return res, nil
903}
904
905func convertToNatPort(portMappings []cni.PortMapping) (*nat.PortMap, error) {
906 portMap := make(nat.PortMap)

Callers 1

ContainerFromNativeFunction · 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…