Skip to content

Commit

Permalink
Merge pull request opencontainers#2815 from hnts/update_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AkihiroSuda authored Feb 23, 2021
2 parents ee06c70 + 53d3b55 commit f245b8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ struct describing how the container is to be created. A sample would look simila

```go
defaultMountFlags := unix.MS_NOEXEC | unix.MS_NOSUID | unix.MS_NODEV
var devices []*configs.DeviceRule
for _, device := range specconv.AllowedDevices {
devices = append(devices, &device.Rule)
}
config := &configs.Config{
Rootfs: "/your/path/to/rootfs",
Capabilities: &configs.Capabilities{
Expand Down Expand Up @@ -155,7 +159,7 @@ config := &configs.Config{
Parent: "system",
Resources: &configs.Resources{
MemorySwappiness: nil,
Devices: specconv.AllowedDevices,
Devices: devices,
},
},
MaskPaths: []string{
Expand Down

0 comments on commit f245b8c

Please sign in to comment.