moby/docs/reference/commandline
Yong Tang 846baf1fd3 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>
2016-11-04 09:43:10 -07:00
..
attach.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
build.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
cli.md Merge pull request #28053 from gdevillele/pr_fix_docs_frontmatter_keywords_2 2016-11-03 17:16:40 -07:00
commit.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
container_prune.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
cp.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
create.md Add --cpus flag to control cpu resources 2016-11-04 09:43:10 -07:00
deploy.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
diff.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
docker_images.gif retooling for hugo 2015-06-15 13:19:38 -07:00
dockerd.md Merge pull request #26276 from runcom/seccomp-conf 2016-11-04 15:45:30 +00:00
events.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
exec.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
export.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
history.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
image_prune.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
images.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
import.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
index.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
info.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
kill.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
load.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
login.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
logout.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
logs.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
menu.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_connect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_create.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_disconnect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_prune.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
network_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_demote.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_promote.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_ps.md fix frontmatter in reference md files 2016-11-02 14:23:27 -07:00
node_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
node_update.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
pause.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_disable.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_enable.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_install.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
plugin_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
port.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
ps.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
pull.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
push.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
rename.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
restart.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
rmi.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
run.md Add --cpus flag to control cpu resources 2016-11-04 09:43:10 -07:00
save.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
search.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_create.md Merge pull request #27857 from vasil-yordanov/docker-service-hostname-2 2016-11-04 15:22:55 +01:00
service_inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_ps.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_scale.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
service_update.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_config.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_deploy.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_ps.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stack_services.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
start.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stats.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
stop.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
swarm_init.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
swarm_join.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
swarm_join_token.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
swarm_leave.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
swarm_update.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
system_df.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
system_prune.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
tag.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
top.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
unpause.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
update.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
version.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
volume_create.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
volume_inspect.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
volume_ls.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
volume_prune.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
volume_rm.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00
wait.md fix frontmatter keywords value type (string, instead of []string) in /docs/reference 2016-11-03 15:48:30 -07:00