Merge pull request #890 from avagin/emptyns
restore: add the empty-ns option
This commit is contained in:
commit
fd7d128191
|
@ -77,6 +77,10 @@ using the runc checkpoint command.`,
|
||||||
Name: "no-pivot",
|
Name: "no-pivot",
|
||||||
Usage: "do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk",
|
Usage: "do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk",
|
||||||
},
|
},
|
||||||
|
cli.StringSliceFlag{
|
||||||
|
Name: "empty-ns",
|
||||||
|
Usage: "create a namespace, but don't restore its properies",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
imagePath := context.String("image-path")
|
imagePath := context.String("image-path")
|
||||||
|
@ -143,6 +147,10 @@ func restoreContainer(context *cli.Context, spec *specs.Spec, config *configs.Co
|
||||||
|
|
||||||
setManageCgroupsMode(context, options)
|
setManageCgroupsMode(context, options)
|
||||||
|
|
||||||
|
if err := setEmptyNsMask(context, options); err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
|
||||||
// ensure that the container is always removed if we were the process
|
// ensure that the container is always removed if we were the process
|
||||||
// that created it.
|
// that created it.
|
||||||
detach := context.Bool("detach")
|
detach := context.Bool("detach")
|
||||||
|
|
Loading…
Reference in New Issue