Merge pull request #35957 from crosbymichael/ramdisk

Honor DOCKER_RAMDISK with containerd 1.0
This commit is contained in:
Yong Tang 2018-01-08 17:38:17 -08:00 committed by GitHub
commit 94b8a116fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

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