oci: default devices don't need to be listed explicitly
@@ -99,43 +99,11 @@ func DefaultSpec() specs.Spec {
{Type: "pid"},
{Type: "ipc"},
},
+ // Devices implicitly contains the following devices:
+ // null, zero, full, random, urandom, tty, console, and ptmx.
+ // ptmx is a bind-mount or symlink of the container's ptmx.
+ // See also: https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#default-devices
Devices: []specs.Device{
- {
- Type: "c",
- Path: "/dev/zero",
- Major: 1,
- Minor: 5,
- FileMode: fmPtr(0666),
- UID: u32Ptr(0),
- GID: u32Ptr(0),
- },
- Path: "/dev/null",
- Minor: 3,
- Path: "/dev/urandom",
- Minor: 9,
- Path: "/dev/random",
- Minor: 8,
{
Type: "c",
Path: "/dev/fuse",