|
@@ -57,6 +57,8 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
|
|
|
flDeviceReadBps = opts.NewThrottledeviceOpt(opts.ValidateThrottleBpsDevice)
|
|
|
flDeviceWriteBps = opts.NewThrottledeviceOpt(opts.ValidateThrottleBpsDevice)
|
|
|
flLinks = opts.NewListOpts(ValidateLink)
|
|
|
+ flDeviceReadIOps = opts.NewThrottledeviceOpt(opts.ValidateThrottleIOpsDevice)
|
|
|
+ flDeviceWriteIOps = opts.NewThrottledeviceOpt(opts.ValidateThrottleIOpsDevice)
|
|
|
flEnv = opts.NewListOpts(opts.ValidateEnv)
|
|
|
flLabels = opts.NewListOpts(opts.ValidateEnv)
|
|
|
flDevices = opts.NewListOpts(ValidateDevice)
|
|
@@ -118,6 +120,8 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
|
|
|
cmd.Var(&flBlkioWeightDevice, []string{"-blkio-weight-device"}, "Block IO weight (relative device weight)")
|
|
|
cmd.Var(&flDeviceReadBps, []string{"-device-read-bps"}, "Limit read rate (bytes per second) from a device")
|
|
|
cmd.Var(&flDeviceWriteBps, []string{"-device-write-bps"}, "Limit write rate (bytes per second) to a device")
|
|
|
+ cmd.Var(&flDeviceReadIOps, []string{"-device-read-iops"}, "Limit read rate (IO per second) from a device")
|
|
|
+ cmd.Var(&flDeviceWriteIOps, []string{"-device-write-iops"}, "Limit write rate (IO per second) to a device")
|
|
|
cmd.Var(&flVolumes, []string{"v", "-volume"}, "Bind mount a volume")
|
|
|
cmd.Var(&flTmpfs, []string{"-tmpfs"}, "Mount a tmpfs directory")
|
|
|
cmd.Var(&flLinks, []string{"-link"}, "Add link to another container")
|
|
@@ -343,23 +347,25 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
|
|
|
}
|
|
|
|
|
|
resources := Resources{
|
|
|
- CgroupParent: *flCgroupParent,
|
|
|
- Memory: flMemory,
|
|
|
- MemoryReservation: MemoryReservation,
|
|
|
- MemorySwap: memorySwap,
|
|
|
- MemorySwappiness: flSwappiness,
|
|
|
- KernelMemory: KernelMemory,
|
|
|
- CPUShares: *flCPUShares,
|
|
|
- CPUPeriod: *flCPUPeriod,
|
|
|
- CpusetCpus: *flCpusetCpus,
|
|
|
- CpusetMems: *flCpusetMems,
|
|
|
- CPUQuota: *flCPUQuota,
|
|
|
- BlkioWeight: *flBlkioWeight,
|
|
|
- BlkioWeightDevice: flBlkioWeightDevice.GetList(),
|
|
|
- BlkioDeviceReadBps: flDeviceReadBps.GetList(),
|
|
|
- BlkioDeviceWriteBps: flDeviceWriteBps.GetList(),
|
|
|
- Ulimits: flUlimits.GetList(),
|
|
|
- Devices: deviceMappings,
|
|
|
+ CgroupParent: *flCgroupParent,
|
|
|
+ Memory: flMemory,
|
|
|
+ MemoryReservation: MemoryReservation,
|
|
|
+ MemorySwap: memorySwap,
|
|
|
+ MemorySwappiness: flSwappiness,
|
|
|
+ KernelMemory: KernelMemory,
|
|
|
+ CPUShares: *flCPUShares,
|
|
|
+ CPUPeriod: *flCPUPeriod,
|
|
|
+ CpusetCpus: *flCpusetCpus,
|
|
|
+ CpusetMems: *flCpusetMems,
|
|
|
+ CPUQuota: *flCPUQuota,
|
|
|
+ BlkioWeight: *flBlkioWeight,
|
|
|
+ BlkioWeightDevice: flBlkioWeightDevice.GetList(),
|
|
|
+ BlkioDeviceReadBps: flDeviceReadBps.GetList(),
|
|
|
+ BlkioDeviceWriteBps: flDeviceWriteBps.GetList(),
|
|
|
+ BlkioDeviceReadIOps: flDeviceReadIOps.GetList(),
|
|
|
+ BlkioDeviceWriteIOps: flDeviceWriteIOps.GetList(),
|
|
|
+ Ulimits: flUlimits.GetList(),
|
|
|
+ Devices: deviceMappings,
|
|
|
}
|
|
|
|
|
|
config := &Config{
|