Commit Graph

576 Commits

Author SHA1 Message Date
3cfa043d6e cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 49b6be893c
Component: cli
2017-06-02 00:10:34 +00:00
0aeba134e4 Add custom DNS settings to service update
This fix adds `--dns-add`, `--dns-rm`, `--dns-opt-add`, `--dns-opt-rm`,
`--dns-search-add` and `--dns-search-rm` to `service update`.

An integration test and a unit test have been added to cover the changes in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6355071b17
Component: cli
2017-06-02 00:10:34 +00:00
cf388afdfa Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80fb5e93ee
Component: cli
2017-06-02 00:10:34 +00:00
f2bafbb576 support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: d1ed73508a
Component: cli
2017-06-02 00:10:34 +00:00
6336325257 Change to plural forms for help output of docker service update
This fix is based on the comment in
https://github.com/docker/docker/pull/27567#discussion_r86910604

Basically, in the help output of `docker service update`, the `--xxx-add`
flags typically have plural forms while `--xxx-rm` flags have singular
forms.

This fix updates the help output for consistency.

This fix also updates the related docs in `service_update.md`.
The help output in `service_update.md` has been quite out-of-sync
with the actual output so this fix replaces the output with the
most up-to-date output.

This fix is related to #27567.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e2f6503609
Component: cli
2017-06-02 00:10:34 +00:00
3d48ab983d support show numbers of global service in service ls command
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5af84edf26
Component: cli
2017-06-02 00:10:34 +00:00
233e18f1ff Add --tty to docker service create/update
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7443d74e2d
Component: cli
2017-06-02 00:10:33 +00:00
2fc68b8590 support env for docker plugin set
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 809dee7e20
Component: cli
2017-06-02 00:10:32 +00:00
acbe6a8c1a remove COMMAND column from service ls output. closes #27994
Signed-off-by: Alicia Lauerman <alicia@eta.im>
Upstream-commit: 5ad8af8fd1
Component: cli
2017-06-02 00:10:32 +00:00
f6db982a85 Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: b7c6c84fdd
Component: cli
2017-06-02 00:10:32 +00:00
5b7fe391d6 Rectify Images display information for docker 1.10.3
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 55d4ce14dd
Component: cli
2017-06-02 00:10:32 +00:00
9ec26ffaf2 Update docs for the output of docker build (Step 1/...)
PR 24978 adds hint of of progress to the output of `docker build`
for 1.13, in the format of
```
Step 1/5 ...
...
Step 2/5 ...
...
```

Though some of the docs hasn't been updated.

This fix did a grep in docs and updated the related places.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4139784154
Component: cli
2017-06-02 00:10:32 +00:00
17f22ba07a Align arg with other cli
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: f5298c5f4d
Component: cli
2017-06-02 00:10:32 +00:00
190608ece5 Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 09e1fc1540
Component: cli
2017-06-02 00:10:32 +00:00
829f4efead modify URL because installation directory removed
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 7b024c69ee
Component: cli
2017-06-02 00:10:32 +00:00
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
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
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
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
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
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