Merge pull request #1810 from albers/completion-buildkit

Add BuildKit specific options to bash completion
This commit is contained in:
Sebastiaan van Stijn 2019-04-18 17:56:12 +02:00 committed by GitHub
commit fe19be2530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 2 deletions

View File

@ -2863,7 +2863,6 @@ _docker_image_build() {
"
local boolean_options="
--compress
--disable-content-trust=false
--force-rm
--help
@ -2872,15 +2871,34 @@ _docker_image_build() {
--quiet -q
--rm
"
if __docker_server_is_experimental ; then
options_with_args+="
--platform
"
boolean_options+="
--squash
"
fi
if [ "$DOCKER_BUILDKIT" = "1" ] ; then
options_with_args+="
--output -o
--platform
--progress
--secret
--ssh
"
else
boolean_options+="
--compress
"
if __docker_server_is_experimental ; then
boolean_options+="
--stream
"
fi
fi
local all_options="$options_with_args $boolean_options"
@ -2926,6 +2944,10 @@ _docker_image_build() {
esac
return
;;
--progress)
COMPREPLY=( $( compgen -W "auto plain tty" -- "$cur" ) )
return
;;
--tag|-t)
__docker_complete_images --repo --tag
return