mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
846baf1fd3
This fix tries to address the proposal raised in 27921 and add `--cpus` flag for `docker run/create`. Basically, `--cpus` will allow user to specify a number (possibly partial) about how many CPUs the container will use. For example, on a 2-CPU system `--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share. This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay have a concept of NanoCPUs for tasks. The `--cpus` flag will translate the number into reused `NanoCPUs` to be consistent. This fix adds integration tests to cover the changes. Related docs (`docker run` and Remote APIs) have been updated. This fix fixes 27921. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> |
||
---|---|---|
.. | ||
backend | ||
blkiodev | ||
container | ||
events | ||
filters | ||
mount | ||
network | ||
reference | ||
registry | ||
strslice | ||
swarm | ||
time | ||
versions | ||
volume | ||
auth.go | ||
client.go | ||
configs.go | ||
error_response.go | ||
id_response.go | ||
image_summary.go | ||
plugin.go | ||
plugin_device.go | ||
plugin_env.go | ||
plugin_interface_type.go | ||
plugin_mount.go | ||
plugin_responses.go | ||
port.go | ||
seccomp.go | ||
stats.go | ||
types.go | ||
volume.go |