Skip to content

Commit 5dd3879

Browse files
committed
darwin: use the default values for socketRoot variable
Since the /run directory on macOS is read-only, darwin containerd should use a different directory. Use the pre-defined default values instead to avoid this issue. Fixes: bd908ac ("Use path based unix socket for shims") Signed-off-by: Hajime Tazaki <[email protected]>
1 parent e00f87f commit 5dd3879

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

runtime/v2/shim/util_unix.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"syscall"
3131
"time"
3232

33+
"github.com/containerd/containerd/defaults"
3334
"github.com/containerd/containerd/namespaces"
3435
"github.com/containerd/containerd/pkg/dialer"
3536
"github.com/containerd/containerd/sys"
@@ -63,7 +64,7 @@ func AdjustOOMScore(pid int) error {
6364
return nil
6465
}
6566

66-
const socketRoot = "/run/containerd"
67+
const socketRoot = defaults.DefaultStateDir
6768

6869
// SocketAddress returns a socket address
6970
func SocketAddress(ctx context.Context, socketPath, id string) (string, error) {

0 commit comments

Comments
 (0)