RootlessContainredSockAddress returns sock address of rootless containerd based on https://github.com/containerd/nerdctl/blob/main/docs/faq.md#containerd-socket-address
()
| 72 | |
| 73 | // RootlessContainredSockAddress returns sock address of rootless containerd based on https://github.com/containerd/nerdctl/blob/main/docs/faq.md#containerd-socket-address |
| 74 | func 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. |
nothing calls this directly
no test coverage detected
searching dependent graphs…