Add opt for default unix device permissions
These opts either inherit the parent cgroup device.list or append the default unix devices like /dev/null /dev/random so that the container has access. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
if context.IsSet("config") {
|
||||
opts = append(opts, oci.WithSpecFromFile(context.String("config")))
|
||||
} else {
|
||||
opts = append(opts, oci.WithDefaultSpec())
|
||||
opts = append(opts, oci.WithDefaultSpec(), oci.WithDefaultUnixDevices)
|
||||
}
|
||||
|
||||
opts = append(opts, oci.WithEnv(context.StringSlice("env")))
|
||||
|
Reference in New Issue
Block a user