From 5392f72ea0a881734df222c5a9feae5e7b156d95 Mon Sep 17 00:00:00 2001 From: Bogdan Anton Date: Sun, 1 Apr 2018 17:34:58 +0300 Subject: [PATCH 1/3] [docs] Fix typo in manifest command docs: updated `MANFEST` to `MANIFEST`. Signed-off-by: Bogdan Anton Upstream-commit: 9fa6bd4174a1bedfae8f705e694be477f64a45ce Component: cli --- components/cli/cli/command/manifest/create_list.go | 2 +- components/cli/docs/reference/commandline/manifest.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cli/cli/command/manifest/create_list.go b/components/cli/cli/command/manifest/create_list.go index bfcca77056..2ef811412d 100644 --- a/components/cli/cli/command/manifest/create_list.go +++ b/components/cli/cli/command/manifest/create_list.go @@ -21,7 +21,7 @@ func newCreateListCommand(dockerCli command.Cli) *cobra.Command { opts := createOpts{} cmd := &cobra.Command{ - Use: "create MANFEST_LIST MANIFEST [MANIFEST...]", + Use: "create MANIFEST_LIST MANIFEST [MANIFEST...]", Short: "Create a local manifest list for annotating and pushing to a registry", Args: cli.RequiresMinArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/components/cli/docs/reference/commandline/manifest.md b/components/cli/docs/reference/commandline/manifest.md index cb02430e7d..35df142d72 100644 --- a/components/cli/docs/reference/commandline/manifest.md +++ b/components/cli/docs/reference/commandline/manifest.md @@ -65,7 +65,7 @@ Options: ### manifest create ```bash -Usage: docker manifest create MANFEST_LIST MANIFEST [MANIFEST...] +Usage: docker manifest create MANIFEST_LIST MANIFEST [MANIFEST...] Create a local manifest list for annotating and pushing to a registry From 119115ef8dbf06404fafab9a4775d10fe2b0e7e4 Mon Sep 17 00:00:00 2001 From: Kyle Spiers Date: Tue, 3 Apr 2018 17:54:09 -0700 Subject: [PATCH 2/3] add fish completions for docker trust subcommand Signed-off-by: Kyle Spiers Upstream-commit: 4439f6446ec1f883d6695f58f2ab5b607872b3d9 Component: cli --- .../cli/contrib/completion/fish/docker.fish | 64 ++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/components/cli/contrib/completion/fish/docker.fish b/components/cli/contrib/completion/fish/docker.fish index 178aa9c3ab..05cefd9d88 100644 --- a/components/cli/contrib/completion/fish/docker.fish +++ b/components/cli/contrib/completion/fish/docker.fish @@ -16,7 +16,7 @@ function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' for i in (commandline -opc) - if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs pause port ps pull push rename restart rm rmi run save search start stop tag top unpause version wait stats + if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs pause port ps pull push rename restart rm rmi run save search start stop tag top trust unpause version wait stats return 1 end end @@ -34,6 +34,40 @@ function __fish_print_docker_containers --description 'Print a list of docker co end end +function __fish_docker_no_subcommand_trust --description 'Test if docker has yet to be given the trust subcommand' + if __fish_seen_subcommand_from trust + for i in (commandline -opc) + if contains -- $i inspect key revoke sign signer + return 1 + end + end + return 0 + end + return 1 +end + +function __fish_docker_subcommand_path --description 'Test if command has all arguments in any order' + set -l cmd (commandline -poc) + set -e cmd[1] + for sub in $argv + if not contains -- $sub $cmd + return 1 + end + end + return 0 +end + +function __fish_docker_subcommand_path_without --description 'Test if command has all arguments in any order' + set -l cmd (commandline -poc) + set -e cmd[1] + for sub in $argv + if contains -- $sub $cmd + return 1 + end + end + return 0 +end + function __fish_print_docker_images --description 'Print a list of docker images' docker images --format "{{.Repository}}:{{.Tag}}" | command grep -v '' end @@ -396,6 +430,34 @@ complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Lookup the run complete -c docker -A -f -n '__fish_seen_subcommand_from top' -l help -d 'Print usage' complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container" +#trust +complete -c docker -f -n '__fish_docker_no_subcommand' -a trust -d 'Manage trust on Docker images' +complete -c docker -A -f -n '__fish_seen_subcommand_from trust' -l help -d 'Print usage' + +#trust inspect +complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a inspect -d 'Return low-level information about keys and signatures' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust inspect' -l pretty -d 'Print the information in a human friendly format' + +#trust key +complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a key -d 'Manage keys for signing Docker images' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a generate -d 'Generate and load a signing key-pair' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l dir -d 'Directory to generate key in, defaults to current directory' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a load -d 'Load a private key file for signing' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l name -d 'Name for the loaded key (default "signer")' + +#trust revoke +complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a revoke -d 'Remove trust for an image' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust revoke' -s y -l yes -d 'Do not prompt for confirmation' + +#trust sign +complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a sign -d 'Sign an image' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust sign' -l local -d 'Sign a locally tagged image' + +#trust signer +complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a signer -d 'Manage entities who can sign Docker images' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a add -d 'Add a signer' +complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a remove -d 'remove a signer' + # unpause complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause a paused container' complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container" From 87af25ac9efef32a24d2e4e8abe790f5a17322b5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 9 Apr 2018 13:35:12 -0700 Subject: [PATCH 3/3] Bump version to 18.05.0-dev Docker 18.04.0 branch was cut from e6e47d95b5e3c54592ef7cef6dedbec6687e66d8 Signed-off-by: Sebastiaan van Stijn Upstream-commit: 341486299ad846018a4dde613c2ed705a4472764 Component: cli --- components/cli/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cli/VERSION b/components/cli/VERSION index cc7864ad80..9a8fa16e78 100644 --- a/components/cli/VERSION +++ b/components/cli/VERSION @@ -1 +1 @@ -18.04.0-dev +18.05.0-dev