Commit Graph

693 Commits

Author SHA1 Message Date
b1abdb7217 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: d93d09acaa
Component: cli
2017-06-02 00:10:32 +00:00
0ce8491828 daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9ba2472a0b
Component: cli
2017-06-02 00:10:32 +00:00
7512a6b872 Adding the hostname option to docker service command
Signed-off-by: Nikolay Milovanov <nmil@itransformers.net>
Upstream-commit: ea6fc78b8f
Component: cli
2017-06-02 00:10:32 +00:00
35146fe359 fix frontmatter keywords value type (string, instead of []string) in /docs/reference
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 572c6bb89a
Component: cli
2017-06-02 00:10:31 +00:00
b2f1abe039 Add for String
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: af5af201fe
Component: cli
2017-06-02 00:10:31 +00:00
3f6d668bc0 added node ip autodetection
Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 194bb052dc
Component: cli
2017-06-02 00:10:31 +00:00
f4590ea5c1 cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 0e7bbb55c8
Component: cli
2017-06-02 00:10:31 +00:00
3295d6d471 Add stack service and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: d74d024775
Component: cli
2017-06-02 00:10:31 +00:00
df9a425166 add replicated in service scale command description
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ef09aafc3e
Component: cli
2017-06-02 00:10:31 +00:00
9304633193 fix frontmatter in reference md files
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 1814d5121e
Component: cli
2017-06-02 00:10:31 +00:00
94c993c344 node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6cf2234377
Component: cli
2017-06-02 00:10:31 +00:00
f6a9ceccb8 Add metrics docs to cli reference
Fixes #27843

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 94bc15016e
Component: cli
2017-06-02 00:10:31 +00:00
dca11896a7 Remove some redundant consts
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 8cb80e77d1
Component: cli
2017-06-02 00:10:31 +00:00
c34aa02124 Add StatsFormat to the config.json file
As for `ps`, `images`, `network ls` and `volume ls`, this makes it
possible to define a custom default format.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ec318edf12
Component: cli
2017-06-02 00:10:31 +00:00
1190a21029 Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e34679982f
Component: cli
2017-06-02 00:10:31 +00:00
a96b192800 Convert Unused ARG error to warning
Signed-off-by: Addam Hardy <addam.hardy@gmail.com>
Upstream-commit: 44edbbdbc2
Component: cli
2017-06-02 00:10:31 +00:00
0bed104764 Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 49a282eb1c
Component: cli
2017-06-02 00:10:31 +00:00
bb937f7f14 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: a17a06204d
Component: cli
2017-06-02 00:10:30 +00:00
b3e2a4db99 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: dfcd777cbc
Component: cli
2017-06-02 00:10:30 +00:00
4f25fac5e6 Add "userns" to docker info security options output
If user namespaces is enabled on the daemon, reveal that via docker info
by adding "userns" to the list of security options reported by the
info endpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: c6c5d28828
Component: cli
2017-06-02 00:10:30 +00:00
34fb473d99 Add --format to man and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: baed1a070e
Component: cli
2017-06-02 00:10:30 +00:00
86b85650ce Update docs for dockerd.md about max-concurrent-downloads/max-concurrent-uploads
It seems that `max-concurrent-downloads` and `max-concurrent-uploads`
are supported in Windows for `config.json`. Though that was not
mentioned in the docs for dockerd.md.

This fix adds the following to the example `config.json` file for Windows:
```
    "max-concurrent-downloads": 3,
    "max-concurrent-uploads": 5,
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7b22b129b9
Component: cli
2017-06-02 00:10:30 +00:00
abd803a329 Windows: Clarify WORKDIR in docs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 65bc3e9b3b
Component: cli
2017-06-02 00:10:30 +00:00
18c108f9d5 Service create --group param
--group-add was used for specifying groups for both service create
and service update. For create it was confusing since we don't have
an existing set of groups. Instead I added --group to create, and
moved --group-add to service update only, like --group-rm
This deals with issue 27646

Signed-off-by: Lily Guo <lily.guo@docker.com>

Update flag documentation

Specify that --group, --group-add and --groupd-rm refers to
supplementary user groups

Signed-off-by: Lily Guo <lily.guo@docker.com>

Fix docs for groups and update completion scripts

Signed-off-by: Lily Guo <lily.guo@docker.com>
Upstream-commit: 0e1a3f6bbb
Component: cli
2017-06-02 00:10:30 +00:00
08be90cdc7 fill all the rest invalid address because no related directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 9b109cd9a7
Component: cli
2017-06-02 00:10:30 +00:00
94054df6ff fill the complete address because of no userguide directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2603a9c1dd
Component: cli
2017-06-02 00:10:30 +00:00
0a2fb5212e Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
Upstream-commit: 836b1a7d0a
Component: cli
2017-06-02 00:10:30 +00:00
21e47eacef Update examples in builder.md
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5934d2a0ed
Component: cli
2017-06-02 00:10:30 +00:00
970c7ca454 Fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6af33ef099
Component: cli
2017-06-02 00:10:29 +00:00
bd38caee5f fixes #27643
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Upstream-commit: d398440f03
Component: cli
2017-06-02 00:10:29 +00:00
2fe48a04ec Remove --name flag from service update
The --name flag was inadvertently added to
docker service update, but is not supported,
as it has various side-effects (e.g., existing
tasks are not renamed).

This removes the flag from the service update
command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6fbb9227cb
Component: cli
2017-06-02 00:10:29 +00:00
192d15ece1 Add --env-file flag to docker create service
This fix tries to address the issue in 24712 and add
`--env-file` file to `docker create service`.

Related documentation has been updated.

An additional integration has been added.

This fix fixes 24712.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5acd85c6e8
Component: cli
2017-06-02 00:10:29 +00:00
5ef6f17a9d Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 42ef78911e
Component: cli
2017-06-02 00:10:28 +00:00
a6e7161261 Typo --ti and missing my_strace_docker_image
Signed-off-by: Leo Gallucci <leo.gallucci@zalando.de>
Upstream-commit: 74e0f7857b
Component: cli
2017-06-02 00:10:28 +00:00
8004b9853e add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b4f6b6d970
Component: cli
2017-06-02 00:10:28 +00:00
5addbf284f add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8f0be436cd
Component: cli
2017-06-02 00:10:28 +00:00
32d2c358e9 update docs/reference/commandline/network_inspect.md
The following sentences (introduced in v1.11 via #21160) were misleading for Swarm mode services (>= v1.12)

  For networks backed by multi-host network driver, such as Overlay,
  this command also shows the container endpoints in other hosts in the
  cluster. These endpoints are represented as "ep-{endpoint-id}" in the output.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: a91e31b2df
Component: cli
2017-06-02 00:10:28 +00:00
7aea692b20 Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 47b507e48a
Component: cli
2017-06-02 00:10:28 +00:00
94ac28a2ac Fix the incorrect links in the document about network and service
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 4df7e0a9fa
Component: cli
2017-06-02 00:10:28 +00:00
9585717058 Update the subtitle for stack ps
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 78b56b5529
Component: cli
2017-06-02 00:10:28 +00:00
1a07ed1f3c Add force option to service update
Currently, there's no way to restart the tasks of a service without
making an actual change to the service. This leads to us giving awkward
workarounds as in
https://github.com/docker/docker.github.io/pull/178/files, where we tell
people to scale a service up and down to restore balance, or make
unnecessary changes to trigger a restart.

This change adds a --force option to "docker service update", which
forces the service to be updated even if no changes require that.

Since rolling update parameters are respected, the user can use
"docker service --force" to do a rolling restart. For example, the
following is supported:

   docker service update --force --update-parallelism 2 \
   --update-delay 5s myservice

Since the default value of --update-parallelism is 1, the default
behavior is to restart the service one task at a time.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 78c0d50c9f
Component: cli
2017-06-02 00:10:27 +00:00
bdbf35292b Modify the links for docker container commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: f18c41ee83
Component: cli
2017-06-02 00:10:27 +00:00
a1672539b7 fix wrong location for network related doc files
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 4865a342fb
Component: cli
2017-06-02 00:10:26 +00:00
92e2ca3e12 Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: a7124389ed
Component: cli
2017-06-02 00:10:26 +00:00
118bce70c4 Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 7f36c3a1a0
Component: cli
2017-06-02 00:10:26 +00:00
64e77c0c09 support insecure registry in configuration reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9012efce15
Component: cli
2017-06-02 00:10:26 +00:00
6930ed3832 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: 73dd34b2b3
Component: cli
2017-06-02 00:10:25 +00:00
1b7e1da302 Update the link for sharing images via repositories
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 77bcb1c514
Component: cli
2017-06-02 00:10:25 +00:00
8eea5b67a0 Update the link for understand data volumes
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 62fb2cfa94
Component: cli
2017-06-02 00:10:25 +00:00
5b6fca1368 Add config parameter to change stop timeout during daemon shutdown
This fix tries to add a daemon config parameter `--shutdown-timeout`
that specifies the timeout value to stop containers gracefully
(before SIGKILL). The default value is 15s.

The `--shutdown-timeout` parameter is added to daemon options and
config file. It will also be updated during daemon reload.

Additional test cases have been added to cover the change.

This fix fixes #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ef158e3e0a
Component: cli
2017-06-02 00:10:25 +00:00