moby: add a Devices array to the image yml

According to https://github.com/linuxkit/linuxkit/pull/3684#issuecomment-860128095

runc removed the console as a default device, so now it must be specified
explicitly in the OCI config.

See 60e21ec26e

The similar code in moby/moby is here: https://github.com/moby/moby/blob/master/oci/devices_linux.go

This patch allows packages to declare a `devices` array, which can contain `/dev/console` etc.

Signed-off-by: David Scott <dave@recoil.org>
This commit is contained in:
David Scott
2021-08-07 19:54:00 +01:00
parent d0145160a8
commit 24db42dd68
4 changed files with 104 additions and 1 deletions

View File

@@ -14,5 +14,26 @@ config:
- /var/lib/containerd:/var/lib/containerd
- /dev:/dev
- /sys:/sys
devices:
- path: "/dev/console"
type: c
major: 5
minor: 1
mode: 0666
- path: "/dev/tty0"
type: c
major: 4
minor: 0
mode: 0666
- path: "/dev/ttyS0"
type: c
major: 4
minor: 64
mode: 0666
- path: "/dev/ttyAMA0"
type: c
major: 204
minor: 64
mode: 0666
capabilities:
- all