浏览代码

Merge pull request #35957 from crosbymichael/ramdisk

Honor DOCKER_RAMDISK with containerd 1.0
Yong Tang 7 年之前
父节点
当前提交
94b8a116fb
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      libcontainerd/client_daemon.go

+ 3 - 2
libcontainerd/client_daemon.go

@@ -262,8 +262,9 @@ func (c *client) Start(ctx context.Context, id, checkpointDir string, withStdin
 		func(_ context.Context, _ *containerd.Client, info *containerd.TaskInfo) error {
 			info.Checkpoint = cp
 			info.Options = &runctypes.CreateOptions{
-				IoUid: uint32(uid),
-				IoGid: uint32(gid),
+				IoUid:       uint32(uid),
+				IoGid:       uint32(gid),
+				NoPivotRoot: os.Getenv("DOCKER_RAMDISK") != "",
 			}
 			return nil
 		})