Skip to content

Commit 32a4661

Browse files
authored
Enable all devices in privileged mode
The Privileged mode in containerd driver is not adding devices from host device. This change will make the driver's privileged mode equivalent to ctr tool's privileged mode - https://github.com/containerd/containerd/blob/main/cmd/ctr/commands/run/run_unix.go#L205-L207
1 parent bbb554b commit 32a4661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

containerd/containerd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (d *Driver) createContainer(containerConfig *ContainerConfig, config *TaskC
149149

150150
// Enable privileged mode.
151151
if config.Privileged {
152-
opts = append(opts, oci.WithPrivileged)
152+
opts = append(opts, oci.WithPrivileged, oci.WithAllDevicesAllowed, oci.WithHostDevices)
153153
}
154154

155155
// WithPidsLimit sets the container's pid limit or maximum

0 commit comments

Comments
 (0)