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

Function RootlessContainredSockAddress

pkg/rootlessutil/rootlessutil_linux.go:74–84  ·  view source on GitHub ↗

RootlessContainredSockAddress returns sock address of rootless containerd based on https://github.com/containerd/nerdctl/blob/main/docs/faq.md#containerd-socket-address

()

Source from the content-addressed store, hash-verified

72
73// RootlessContainredSockAddress returns sock address of rootless containerd based on https://github.com/containerd/nerdctl/blob/main/docs/faq.md#containerd-socket-address
74func RootlessContainredSockAddress() (string, error) {
75 stateDir, err := RootlessKitStateDir()
76 if err != nil {
77 return "", err
78 }
79 childPid, err := RootlessKitChildPid(stateDir)
80 if err != nil {
81 return "", err
82 }
83 return filepath.Join(fmt.Sprintf("/proc/%d/root/run/containerd/containerd.sock", childPid)), nil
84}
85
86// DetachedNetNS returns non-empty netns path if RootlessKit is running with --detach-netns mode.
87// Otherwise returns "" without an error.

Callers

nothing calls this directly

Calls 2

RootlessKitStateDirFunction · 0.85
RootlessKitChildPidFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…