Commit Graph

387 Commits

Author SHA1 Message Date
Sebastiaan van Stijn df8b34595b
cli/command/container: stop, restart: rename "--time" to "--timeout"
This renames the `--time` flag as used on `docker stop` and `docker restart`
to `--timeout`,  bringing it in line with other uses for this property,
such as `--stop-timeout` on `docker run`.

The `--time` option is deprecated and hidden, but will be kept for
backward compatibility, as these options existed for a long time.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-30 09:43:54 +02:00
Sebastiaan van Stijn b14094df53
contrib/completion: remove logentries logging-driver
This driver has been deprecated and removed because the service
is no longer operational.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-13 13:15:14 +01:00
Sebastiaan van Stijn 73fbcdea05
contrib/completion: remove aufs, legacy overlay
The AuFS and (legacy) overlay storage drivers have been deprecated and
removed, so remove them from the completion scripts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-19 00:59:25 +02:00
Sebastiaan van Stijn 9f15ba0d13
Merge pull request #4156 from AkihiroSuda/docker-run-annotation
cli/command/container: implement `docker run --annotation`
2023-05-06 00:49:15 +02:00
Sebastiaan van Stijn 0dec5d20a2
volumes: prune: add --all / -a option
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-20 23:31:47 +02:00
Akihiro Suda 88be16cb5b
cli/command/container: implement `docker run --annotation`
For moby/moby PR 45025 (Docker v24, API v1.43).

`docker run --annotation foo=bar` is similar to `podman run --annotation foo=bar`,
however, unlike Podman, Docker implementation also accepts an annotation with an empty value.
(`docker run --annotation foo`)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-04-14 12:59:12 +09:00
Sebastiaan van Stijn 1af9f22c7e
Merge pull request #2998 from pseyfert/completion/zsh/volume
[completion/zsh] add volume completion
2023-01-13 12:22:14 +01:00
Luis Henrique Mulinari 684dcd7b63
Fix the max-concurrent-downloads and max-concurrent-uploads configs documentation
This fix tries to address issues raised in moby/moby#44346.
The max-concurrent-downloads and max-concurrent-uploads limits are applied for the whole engine and not for each pull/push command.

Signed-off-by: Luis Henrique Mulinari <luis.mulinari@gmail.com>
2022-10-28 16:31:27 +01:00
Sebastiaan van Stijn 1d6c6e2367
Merge pull request #3130 from acouvreur/master
feat(zsh): add context argument completion
2022-10-13 15:24:13 +02:00
Sebastiaan van Stijn 5eb24bfd11
completion: remove options related to deprecated cluster-store
This removes completion for flags related to legacy overlay networks using
an external k/v store.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-17 11:03:25 +02:00
Sebastiaan van Stijn 2d74be89e2
contrib/completion: remove orchestrator flags from zsh completion
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-01 14:03:56 +02:00
Marc Cornellà b1f18b700e
fix: remove asterisk from docker command suggestions
Some commands in the output of `docker` show up with an asterisk, like
app, build, buildx or scan. This tweak removes that so that the
asterisk is not filled in when choosing those commands.

Signed-off-by: Marc Cornellà <hello@mcornella.com>
2022-04-06 19:56:26 +02:00
Sebastiaan van Stijn bcd4101f3d
tweak description of login/logout
Remove "Docker" from registry, as the registry specification is no
longer docker-specific, but part of the OCI distribution spec.

Also removed "Register" from one of the docs pages, as the login
command hasn't supported creating a new acccount on Docker Hub for
a long time.

I'm wondering if we should be more explicit about what log in / out
does (effectively; authenticate, and on success store the credentials
or token, and on log out; remove credentials/token).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 10:44:11 +02:00
Sebastiaan van Stijn b7b923db41
tweak description of "docker push" and "docker pull" commands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-01 12:33:05 +02:00
Sebastiaan van Stijn 6e6652b702
tweak description of "docker run" command
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-01 12:28:37 +02:00
Sebastiaan van Stijn ac22b2bf52
tweak description of "docker exec" command
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-01 12:28:34 +02:00
Nicolas De loof d8afb01e00
Merge pull request #3466 from glebsts/docker-push-all-tags-docs-improve-signed 2022-03-17 12:27:23 +01:00
Silvin Lubecki d8ecb00dda
Update shell completion scripts
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2022-03-15 15:36:04 +01:00
Gleb Stsenov de05499267
align wording of push --all-tags parameter description
Signed-off-by: Gleb Stsenov <gleb.stsenov@gmail.com>
2022-03-10 19:48:41 +02:00
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
acouvreur 79638e6ea4
feat(docker): add context argument completion
Signed-off-by: acouvreur <alexiscouvreur.pro@gmail.com>
2021-06-14 08:22:46 +02:00
Paul Seyfert 35b42efad3 [completion/zsh] add volume completion
This provides completion for `docker run ... -v <TAB>`.
This closes (part of) #1997.

Signed-off-by: Paul Seyfert <pseyfert.mathphys@gmail.com>
2021-03-04 22:50:38 +01: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
Sebastiaan van Stijn 325036df3e
Merge pull request #2831 from tianon/containerd
Add "--containerd-namespace" daemon flags in completion and docs
2020-11-10 23:57:02 +01:00
Tianon Gravi 3d84db96b4 Remove really outdated zsh-completion REVIEWERS file
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-11-06 12:42:08 -08: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