Support adding devices by dir
This enables cases where devices exist in a subdirectory of /dev, particularly where those device names are not portable across machines, which makes it problematic to specify from a runtime such as cri. Added this to `ctr` as well so I could test that the code at least works. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -264,7 +264,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
opts = append(opts, oci.WithMemoryLimit(limit))
|
||||
}
|
||||
for _, dev := range context.StringSlice("device") {
|
||||
opts = append(opts, oci.WithLinuxDevice(dev, "rwm"))
|
||||
opts = append(opts, oci.WithDevices(dev, "", "rwm"))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user