mirror of https://github.com/docker/cli.git
Add bash completion for `stack deploy --resolve-image`
Also adds minimal documentation for this flag. Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
fb7a817583
commit
9559b9b7a8
|
@ -4346,16 +4346,20 @@ _docker_stack_deploy() {
|
||||||
_filedir yml
|
_filedir yml
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--resolve-image)
|
||||||
|
COMPREPLY=( $( compgen -W "always changed never" -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
local options="--compose-file -c --help --prune --with-registry-auth"
|
local options="--compose-file -c --help --prune --resolve-image --with-registry-auth"
|
||||||
__docker_daemon_is_experimental && options+=" --bundle-file"
|
__docker_daemon_is_experimental && options+=" --bundle-file"
|
||||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local counter=$(__docker_pos_first_nonflag '--compose-file|-c|--bundle-file')
|
local counter=$(__docker_pos_first_nonflag '--bundle-file|--compose-file|-c|--resolve-image')
|
||||||
if [ "$cword" -eq "$counter" ]; then
|
if [ "$cword" -eq "$counter" ]; then
|
||||||
__docker_complete_stacks
|
__docker_complete_stacks
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -28,6 +28,8 @@ Options:
|
||||||
-c, --compose-file string Path to a Compose file
|
-c, --compose-file string Path to a Compose file
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--prune Prune services that are no longer referenced
|
--prune Prune services that are no longer referenced
|
||||||
|
--resolve-image string Query the registry to resolve image digest and supported platforms
|
||||||
|
("always"|"changed"|"never") (default "always")
|
||||||
--with-registry-auth Send registry authentication details to Swarm agents
|
--with-registry-auth Send registry authentication details to Swarm agents
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue