Files
docker-cli/components/engine/integration-cli
Yong Tang 133eec9cfa Add --cpus flag to control cpu resources
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>
Upstream-commit: 846baf1fd3efcbfbf9d3eb99e436ca9a59d3e185
Component: engine
2016-11-04 09:43:10 -07:00
..
2016-10-24 15:20:01 -07:00
2016-10-29 15:03:26 +08:00
2016-06-02 17:17:22 +08:00
2016-08-09 09:42:23 +08:00
2016-09-07 17:30:35 -04:00
2016-09-02 19:07:54 -07:00