linux: Honor RuncOptions if set on container

This also fix the type used for RuncOptions.SystemCgroup, hence introducing
an API break.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-30 15:20:57 -07:00
parent e0d8cb1366
commit ab0cb4e756
12 changed files with 378 additions and 222 deletions

View File

@@ -66,6 +66,14 @@ func main() {
Name: "workdir,w",
Usage: "path used to store large temporary data",
},
cli.StringFlag{
Name: "criu,c",
Usage: "path to criu",
},
cli.BoolFlag{
Name: "systemd-cgroup",
Usage: "set runtime to use systemd-cgroup",
},
}
app.Before = func(context *cli.Context) error {
if context.GlobalBool("debug") {
@@ -90,9 +98,13 @@ func main() {
return err
}
sv, err := shim.NewService(
path,
context.GlobalString("namespace"),
context.GlobalString("workdir"),
shim.Config{
Path: path,
Namespace: context.GlobalString("namespace"),
WorkDir: context.GlobalString("workdir"),
Criu: context.GlobalString("criu"),
SystemdCgroup: context.GlobalBool("systemd-cgroup"),
},
&remoteEventsPublisher{client: e},
)
if err != nil {