Skip to content

Commit 4d4a079

Browse files
committed
Merge pull request #340 from liangchenye/master
add omitempty to 'Devices
2 parents 4103108 + 28cc423 commit 4d4a079

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

config.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,7 @@ Here is a full example `config.json` for reference.
414414
{
415415
"type": "mount"
416416
}
417-
],
418-
"devices": null,
419-
"seccomp": {
420-
"defaultAction": "",
421-
"architectures": null
422-
}
417+
]
423418
}
424419
}
425420
```

specs-go/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ type Linux struct {
128128
// If resources are specified, the cgroups at CgroupsPath will be updated based on resources.
129129
CgroupsPath *string `json:"cgroupsPath,omitempty"`
130130
// Namespaces contains the namespaces that are created and/or joined by the container
131-
Namespaces []Namespace `json:"namespaces"`
131+
Namespaces []Namespace `json:"namespaces,omitempty"`
132132
// Devices are a list of device nodes that are created for the container
133-
Devices []Device `json:"devices"`
133+
Devices []Device `json:"devices,omitempty"`
134134
// Seccomp specifies the seccomp security settings for the container.
135135
Seccomp *Seccomp `json:"seccomp,omitempty"`
136136
// RootfsPropagation is the rootfs mount propagation mode for the container.

0 commit comments

Comments
 (0)