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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user