Commit Graph

362 Commits

Author SHA1 Message Date
Chee Hau Lim 1d4431c1e7
cli/command: Add quiet option for create and run
Signed-off-by: Chee Hau Lim <cheehau.lim@mobimeo.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-01 14:20:18 +01:00
Anca Iordache 64b2e95287 Document `--validate` daemon option
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-06-24 15:00:21 +00:00
Sebastiaan van Stijn f52a9e2fef
Add docs and completion for docker node ls --filter node.label
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-27 14:11:31 +01:00
Christopher Svensson b04241d95a
Removed format flag for inspect
Signed-off-by: Christopher Svensson <stoffus@stoffus.com>
2021-01-05 08:29:26 +01:00
Christopher Svensson 584c08e1fe
Added zsh completion for docker context subcommands
Signed-off-by: Christopher Svensson <stoffus@stoffus.com>
2021-01-05 08:29:26 +01:00
Tianon Gravi 8258fc9059 Add "--containerd-namespace" daemon flags in completion and docs
This also adds the missing `containerd` key in the example daemon configuration files.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-11-06 12:34:10 -08:00
Sebastiaan van Stijn 190c64b415
Service cap-add/cap-drop: improve handling of combinations and special "ALL" value
When creating and updating services, we need to avoid unneeded service churn.

The interaction of separate lists to "add" and "drop" capabilities, a special
("ALL") capability, as well as a "relaxed" format for accepted capabilities
(case-insensitive, `CAP_` prefix optional) make this rather involved.

This patch updates how we handle `--cap-add` / `--cap-drop` when  _creating_ as
well as _updating_, with the following rules/assumptions applied:

- both existing (service spec) and new (values passed through flags or in
  the compose-file) are normalized and de-duplicated before use.
- the special "ALL" capability is equivalent to "all capabilities" and taken
  into account when normalizing capabilities. Combining "ALL" capabilities
  and other capabilities is therefore equivalent to just specifying "ALL".
- adding capabilities takes precedence over dropping, which means that if
  a capability is both set to be "dropped" and to be "added", it is removed
  from the list to "drop".
- the final lists should be sorted and normalized to reduce service churn
- no validation of capabilities is handled by the client. Validation is
  delegated to the daemon/server.

When deploying a service using a docker-compose file, the docker-compose file
is *mostly* handled as being "declarative". However, many of the issues outlined
above also apply to compose-files, so similar handling is applied to compose
files as well to prevent service churn.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-08 14:38:35 +02:00
Sebastiaan van Stijn ca35f2973a
Merge pull request #2646 from horpto/patch-1
Add shorthand for --tail option
2020-08-17 17:19:03 +02:00
Richard Chen Zheng 288326da1c
Fix Auto complete options available:
- Add support for --gpus to run/create container in bash and zsh
  - Remove --group from run and update container as it's not a valid flag in zsh
  - Add --group-add --group-rm for create and update update service in bash

Signed-off-by: Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com>
2020-08-13 13:56:33 -04:00
horpto 0b7147a2a5 fix docs, completion and docker service
Signed-off-by: horpto <__Singleton__@hackerdom.ru>
2020-08-06 17:37:08 +03:00
Miroslav Gula 1c79d16d89 added 'docker build --taget' to zsh completion
Signed-off-by: Miroslav Gula <miroslav.gula@naytrolabs.com>
2020-07-20 01:33:02 +02:00
Brian Wieder a6cfbd2351 Added env-file flag to docker exec
Signed-off-by: Brian Wieder <brian@4wieders.com>
2020-06-29 18:32:44 -04:00
Sebastiaan van Stijn 395a6d560d
Add support for --limit-pids on service create / update (swarm)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-18 21:25:02 +02:00
Sebastiaan van Stijn 92dc906059
Merge pull request #1918 from tcoupin/patch-1
completion with container names on restart
2020-04-28 15:57:16 +02:00
Dominik Braun 9d9568263f Replace 'numeric' with object in -q description
Signed-off-by: Dominik Braun <Dominik.Braun@nbsp.de>
2020-03-02 10:28:52 +01:00
Sebastiaan van Stijn 8ef8547eb6
Merge pull request #2024 from rgulewich/1988-run-cgroupns-mode
docker run: specify cgroup namespace mode with --cgroupns
2020-02-11 11:16:05 +01:00
Rob Gulewich 5ad1d4d4c8 docker run: specify cgroup namespace mode with --cgroupns
Signed-off-by: Rob Gulewich <rgulewich@netflix.com>
2020-01-29 22:50:37 +00:00
Sebastiaan van Stijn 9e620e990f
implement docker push -a/--all-tags
The `docker push` command up until [v0.9.1](https://github.com/moby/moby/blob/v0.9.1/api/client.go#L998)
always pushed all tags of a given image, so `docker push foo/bar` would push (e.g.)
all of  `foo/bar:latest`, `foo:/bar:v1`, `foo/bar:v1.0.0`.

Pushing all tags of an image was not desirable in many case, so docker v0.10.0
enhanced `docker push` to optionally specify a tag to push (`docker push foo/bar:v1`)
(see https://github.com/moby/moby/issues/3411 and the pull request that implemented
this: https://github.com/moby/moby/pull/4948).

This behavior exists up until today, and is confusing, because unlike other commands,
`docker push` does not default to use the `:latest` tag when omitted, but instead
makes it push "all tags of the image"

For example, in the following situation;

```
docker images

REPOSITORY          TAG                        IMAGE ID            CREATED             SIZE
thajeztah/myimage   latest                     b534869c81f0        41 hours ago        1.22MB
```

Running `docker push thajeztah/myimage` seemingly does the expected behavior (it
pushes `thajeztah/myimage:latest` to Docker Hub), however, it does not so for the
reason expected (`:latest` being the default tag), but because `:latest` happens
to be the only tag present for the `thajeztah/myimage` image.

If another tag exists for the image:

```
docker images

REPOSITORY          TAG                        IMAGE ID            CREATED             SIZE
thajeztah/myimage   latest                     b534869c81f0        41 hours ago        1.22MB
thajeztah/myimage   v1.0.0                     b534869c81f0        41 hours ago        1.22MB
```

Running the same command (`docker push thajeztah/myimage`) will push _both_ images
to Docker Hub.

> Note that the behavior described above is currently not (clearly) documented;
> the `docker push` reference documentation (https://docs.docker.com/engine/reference/commandline/push/)
does not mention that omitting the tag will push all tags

This patch changes the default behavior, and if no tag is specified, `:latest` is
assumed. To push _all_ tags, a new flag (`-a` / `--all-tags`) is added, similar
to the flag that's present on `docker pull`.

With this change:

- `docker push myname/myimage` will be the equivalent of `docker push myname/myimage:latest`
- to push all images, the user needs to set a flag (`--all-tags`), so `docker push --all-tags myname/myimage:latest`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-28 16:21:06 +01:00
Sebastiaan van Stijn e9b9a0014c
completion: add `--max-download-attempts`
Follow-up to 86281a7b4b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-20 14:47:52 +01:00
Sebastiaan van Stijn 99ad13e374
Remove experimental "deploy" from "dab" files
The top-level `docker deploy` command (using the "Docker Application Bundle"
(`.dab`) file format was introduced as an experimental feature in Docker 1.13 /
17.03, but superseded by support for Docker Compose files.

With no development being done on this feature, and no active use of the file
format, support for the DAB file format and the top-level `docker deploy` command
(hidden by default in 19.03), is removed in this patch, in favour of `docker stack deploy`
using compose files.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-09 10:34:14 +01:00
Rohan Verma 1dc756e8df fix: docker login autocomplete for zsh
Changed `--user` to `--username`

Signed-off-by: Rohan Verma <hello@rohanverma.net>
2019-06-14 13:23:41 +05:30
Thibault Coupin 17e0438289 completion with container names on restart
Signed-off-by: tcoupin <thibault.coupin@gmail.com>
2019-06-09 21:36:02 +02:00
Sunny de3a5f0fe5
Add `--pids-limit` flag to `docker update`
Signed-off-by: Sunny Gogoi <indiasuny000@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-21 01:20:32 +01:00
Aleksa Sarai 647579068f
cli: add a separate --domainname flag
A while ago, Docker split the "Domainname" field out from the "Hostname"
field for the container configuration. There was no real user-visible
change associated with this (and under the hood "Domainname" was mostly
left unused from the command-line point of view). We now add this flag
in order to match other proposed changes to allow for setting the NIS
domainname of a container.

This also includes a fix for the --hostname parsing tests (they would
not error out if only one of .Hostname and .Domainname were incorrectly
set -- which is not correct).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2018-12-08 00:03:56 +11:00
selansen e3e976a82a Data Path Port configuration support
This PR chnages allow user to configure data path
port number. By default we use 4789 port number. But this commit
will allow user to configure port number during swarm init.
Data path port can't be modified after swarm init.

Signed-off-by: selansen <elango.siva@docker.com>
2018-11-28 10:55:42 -05:00
selansen 587a94c935 Global Default Address Pool feature support
This feature brings new attribute/option for swarm init command.
default-addr-pool will take string input which can be in below format.
"CIDR,CIDR,CIDR...:SUBNET-SIZE".
Signed-off-by: selansen <elango.siva@docker.com>
2018-08-21 14:34:00 -04:00
Silvin 6cd0e2fe70
Merge pull request #1222 from thaJeztah/its_not_standard_but_its_in
Update --compose-file flag description to mention stdin
2018-07-30 16:23:29 +02:00
Tom Milligan da00d1c49f Fixed typo breaking zsh docker update autocomplete
Signed-off-by: Tom Milligan <tommilligan@users.noreply.github.com>
2018-07-25 12:23:08 +01:00
Paweł Szczekutowicz 13db1bc95f Added events filter scope zsh completion
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
2018-07-20 15:47:00 +02:00
Sebastiaan van Stijn 2c7822b036
Update --compose-file flag description to mention stdin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-19 14:55:48 +02:00
Mauro Porras P acf3d2d95a Minor fix: "stdin" instead of "stding"
Signed-off-by: Mauro Porras P <mauroporrasp@gmail.com>
2018-05-18 08:48:42 -05:00
Sebastiaan van Stijn c6a7046674
Merge pull request #372 from jphuynh/completion-zsh-event-filter
Update event filter zsh completion with `disable`, `enable`, `install…
2018-02-16 10:16:40 +01:00
ktrysmt db05d8ad79 Fixed #750
Signed-off-by: Kotaro Yoshimatsu <kotaro.yoshimatsu@gmail.com>
2017-12-13 17:45:14 +09:00
Sebastiaan van Stijn a119e39f0c
Update docs and completion-scripts for deprecated features
- the `--disable-legacy-registry` daemon flag was removed
- duplicate keys with conflicting values for engine labels
  now produce an error instead of a warning.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-12 17:09:38 -08:00
Sebastiaan van Stijn 143f9f0336
Merge pull request #730 from BretFisher/729-fix-zsh-node-and-stack-names
Fixing zsh column finding in nodes and stacks.
2017-12-06 16:03:20 -08:00
Sebastiaan van Stijn 86653f4d57
Merge pull request #732 from ndeloof/8917
closes #8917 introduce `—workdir` option for docker exec
2017-12-06 10:51:33 -08:00
Nicolas De Loof 591a1273fd
introduce `—workdir` option for docker exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2017-12-06 17:24:01 +01:00
Bret Fisher 8b6d6fa974 Fixing zsh column finding in nodes and stacks.
Signed-off-by: Bret Fisher <bret@bretfisher.com>
2017-12-05 01:03:25 -05:00
dungeonmaster18 d5271568a2
Added auto complete command for fluentd-sub-second-precision
Signed-off-by: dungeonmaster18 <umesh4257@gmail.com>
2017-12-01 18:39:41 +05:30
Simon Ferquel 47cf2ea683 Add isolation mode on service update/create and compose files
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-11-17 15:31:13 +01:00
Sebastiaan van Stijn e63417a9c0
Add --no-trunc option to docker container stats
This patch adds a `--no-trunc` option to `docker container stats`;

With this patch applied, the default output is:

    CONTAINER ID        NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c91        awesome_brattain                        0.28%               5.629MiB / 1.952GiB   0.28%               916B / 0B           147kB / 0B          9
    67b2525d8ad1        foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.48kB / 0B         4.11MB / 0B         2
    e5c383697914        test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.2kB / 0B         770kB / 0B          1
    4bda148efbc0        random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2        registry                                0.01%               3.402MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778ceb        foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Addin the `--no-trunc` option, changes the output to:

    CONTAINER ID                                                       NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c9161c9b444e3d70e1a9dfba0c1840d41720e146a95a08ebf938afc   awesome_brattain                        0.25%               5.75MiB / 1.952GiB    0.29%               648B / 0B           147kB / 0B          10
    67b2525d8ad10bb236a49960e93c09993b0baabeef12c2d46cd5f4fbb6f4808c   foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.35kB / 0B         4.11MB / 0B         2
    e5c383697914b98b10cbbc9d0bd324b7b927099ac584f031057b8208d2fba9b1   test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.1kB / 0B         770kB / 0B          1
    4bda148efbc006b0063373c3678083159af89f8cc83a6a28def14cb0dd171f70   random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2fc363e06167df9b90ab59f88d4f101e3f9b8df03a62a8f6783e1   registry                                0.00%               3.387MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778cebddf9ec69263a75cfdcf00962a5198d94d42cda75d5cd45bb82f2   foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Which is the same as the default before this patch was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-27 18:59:25 +02:00
Jean-Pierre Huynh 8929c49c3a Add zsh completion for `service rollback`
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-08-20 20:37:27 +01:00
Jean-Pierre Huynh 04d905f6fa Add zsh completion for `docker service scale --detach=false`
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-27 07:48:39 +01:00
Jean-Pierre Huynh ff61438328 Add metric plugins to zsh completion for `plugin ls --filter capability`
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-25 09:24:35 +01:00
Sebastiaan van Stijn 4c30fbcf4c Merge pull request #371 from jphuynh/completion-zsh-service-create-update-publish
Remove duplicate publish option in docker service create/update
2017-07-25 02:54:05 +02:00
Jean-Pierre Huynh d31df921ad Update event filter zsh completion with `disable`, `enable`, `install`, and `remove`
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-21 11:53:05 +01:00
Vincent Demeester 33a25708d4 Merge pull request #369 from jphuynh/completion-zsh-get-log-options
Update __docker_get_log_options completion (zsh)
2017-07-21 11:25:17 +02:00
Jean-Pierre Huynh 6c65ba6c08 Remove duplicate publish option in docker service create/update completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-21 09:53:43 +01:00
Jean-Pierre Huynh d7ade64d29 Update __docker_get_log_options completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-20 23:41:47 +01:00
Jean-Pierre Huynh 6b256484ae Add zsh completion for `system prune --volumes`
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-20 23:13:04 +01:00