Browse code

Merge pull request #35957 from crosbymichael/ramdisk

Honor DOCKER_RAMDISK with containerd 1.0

Yong Tang authored on 2018/01/09 10:38:17
Showing 1 changed files
... ...
@@ -262,8 +262,9 @@ func (c *client) Start(ctx context.Context, id, checkpointDir string, withStdin
262 262
 		func(_ context.Context, _ *containerd.Client, info *containerd.TaskInfo) error {
263 263
 			info.Checkpoint = cp
264 264
 			info.Options = &runctypes.CreateOptions{
265
-				IoUid: uint32(uid),
266
-				IoGid: uint32(gid),
265
+				IoUid:       uint32(uid),
266
+				IoGid:       uint32(gid),
267
+				NoPivotRoot: os.Getenv("DOCKER_RAMDISK") != "",
267 268
 			}
268 269
 			return nil
269 270
 		})