22
33package specs
44
5+ import "os"
6+
57// LinuxSpec is the full specification for Linux containers
68type LinuxSpec struct {
79 Spec
@@ -27,7 +29,7 @@ type Linux struct {
2729 // Capabilities are Linux capabilities that are kept for the container
2830 Capabilities []string `json:"capabilities"`
2931 // Devices are a list of device nodes that are created and enabled for the container
30- Devices []string `json:"devices"`
32+ Devices []Device `json:"devices"`
3133 // RootfsPropagation is the rootfs mount propagation mode for the container
3234 RootfsPropagation string `json:"rootfsPropagation"`
3335}
@@ -157,3 +159,22 @@ type Resources struct {
157159 // Network restriction configuration
158160 Network Network `json:"network"`
159161}
162+
163+ type Device struct {
164+ // Device type, block, char, etc.
165+ Type rune `json:"type"`
166+ // Path to the device.
167+ Path string `json:"path"`
168+ // Major is the device's major number.
169+ Major int64 `json:"major"`
170+ // Minor is the device's minor number.
171+ Minor int64 `json:"minor"`
172+ // Cgroup permissions format, rwm.
173+ Permissions string `json:"permissions"`
174+ // FileMode permission bits for the device.
175+ FileMode os.FileMode `json:"fileMode"`
176+ // UID of the device.
177+ UID uint32 `json:"uid"`
178+ // Gid of the device.
179+ GID uint32 `json:"gid"`
180+ }
0 commit comments